From 8c046b02e259b511bc8b7db63b6bee6ed91f8f96 Mon Sep 17 00:00:00 2001
From: Intel1 <25161862+Intel11@users.noreply.github.com>
Date: Fri, 26 Jan 2018 17:11:19 -0500
Subject: [PATCH] cinemahd: nuevo canal
---
plugin.video.alfa/channels/cinemahd.json | 39 +++++
plugin.video.alfa/channels/cinemahd.py | 173 +++++++++++++++++++++++
2 files changed, 212 insertions(+)
create mode 100644 plugin.video.alfa/channels/cinemahd.json
create mode 100644 plugin.video.alfa/channels/cinemahd.py
diff --git a/plugin.video.alfa/channels/cinemahd.json b/plugin.video.alfa/channels/cinemahd.json
new file mode 100644
index 00000000..10407831
--- /dev/null
+++ b/plugin.video.alfa/channels/cinemahd.json
@@ -0,0 +1,39 @@
+{
+ "id": "cinemahd",
+ "name": "CinemaHD",
+ "active": true,
+ "adult": false,
+ "language": ["lat"],
+ "thumbnail": "",
+ "banner": "",
+ "version": 1,
+ "categories": [
+ "tvshow"
+ ],
+ "settings": [
+ {
+ "id": "include_in_global_search",
+ "type": "bool",
+ "label": "Incluir en busqueda global",
+ "default": false,
+ "enabled": false,
+ "visible": false
+ },
+ {
+ "id": "include_in_newest_peliculas",
+ "type": "bool",
+ "label": "Incluir en Novedades - Peliculas",
+ "default": true,
+ "enabled": true,
+ "visible": true
+ },
+ {
+ "id": "include_in_newest_infantiles",
+ "type": "bool",
+ "label": "Incluir en Novedades - Infantiles",
+ "default": true,
+ "enabled": true,
+ "visible": true
+ }
+ ]
+}
\ No newline at end of file
diff --git a/plugin.video.alfa/channels/cinemahd.py b/plugin.video.alfa/channels/cinemahd.py
new file mode 100644
index 00000000..2a019159
--- /dev/null
+++ b/plugin.video.alfa/channels/cinemahd.py
@@ -0,0 +1,173 @@
+# -*- coding: utf-8 -*-
+# -*- Channel CinemaHD -*-
+# -*- Created for Alfa-addon -*-
+# -*- By the Alfa Develop Group -*-
+
+import re
+from channelselector import get_thumb
+from core import httptools
+from core import scrapertools
+from core import servertools
+from core import tmdb
+from core.item import Item
+from platformcode import config, logger
+
+host = 'http://www.cinemahd.co/'
+
+
+def mainlist(item):
+ logger.info()
+
+ itemlist = list()
+ itemlist.append(item.clone(title="Ultimas", action="list_all", url=host))
+ itemlist.append(item.clone(title="Generos", action="section", section='genre'))
+ itemlist.append(item.clone(title="Por Calidad", action="section", section='quality'))
+ itemlist.append(item.clone(title="Por Año", action="section", section='year'))
+ itemlist.append(item.clone(title="Alfabetico", action="section", section='alpha'))
+ itemlist.append(item.clone(title="Buscar", action="search", url=host+'?s='))
+
+ return itemlist
+
+
+def get_source(url):
+ logger.info()
+ data = httptools.downloadpage(url).data
+ data = re.sub(r'"|\n|\r|\t| |
|\s{2,}', "", data)
+ return data
+
+
+def list_all(item):
+ logger.info()
+ itemlist = []
+ data = get_source(item.url)
+
+ if item.section == 'alpha':
+ patron = '\d+.*?(.*?).*?'
+ patron += '