From a3a5017a49fdfc5d88539c395f23c013c3699d95 Mon Sep 17 00:00:00 2001 From: fymyositulu <45628011+fymyositulu@users.noreply.github.com> Date: Wed, 12 Dec 2018 21:07:41 +0100 Subject: [PATCH 01/27] Add files via upload --- plugin.video.alfa/channels/gnula_biz.json | 173 +++++ plugin.video.alfa/channels/gnula_biz.py | 780 ++++++++++++++++++++++ 2 files changed, 953 insertions(+) create mode 100644 plugin.video.alfa/channels/gnula_biz.json create mode 100644 plugin.video.alfa/channels/gnula_biz.py diff --git a/plugin.video.alfa/channels/gnula_biz.json b/plugin.video.alfa/channels/gnula_biz.json new file mode 100644 index 00000000..28ed7d0f --- /dev/null +++ b/plugin.video.alfa/channels/gnula_biz.json @@ -0,0 +1,173 @@ +{ + "id": "gnula_biz", + "name": "Gnula.Biz", + "active": true, + "adult": false, + "language": ["cast", "lat"], + "thumbnail": "gnula_biz.png", + "banner": "gnula_biz.png", + "categories": [ + "movie", + "tvshow", + "vos" + ], + "settings": [ + { + "id": "include_in_global_search", + "type": "bool", + "label": "Incluir en busqueda global", + "default": true, + "enabled": true, + "visible": true + }, + { + "id": "filter_languages", + "type": "list", + "label": "Mostrar enlaces en idioma...", + "default": 0, + "enabled": true, + "visible": true, + "lvalues": [ + "No filtrar", + "LAT", + "CAST", + "VOSE", + "VO" + ] + }, + { + "id": "save_last_search", + "type": "bool", + "label": "Guardar última búsqueda", + "default": true, + "enabled": true, + "visible": true + }, + { + "id": "include_in_newest_peliculas", + "type": "bool", + "label": "Incluir en Novedades - Películas", + "default": true, + "enabled": true, + "visible": true + }, + { + "id": "include_in_newest_series", + "type": "bool", + "label": "Incluir en Novedades - Series", + "default": true, + "enabled": true, + "visible": true + }, + { + "id": "modo_grafico", + "type": "bool", + "label": "Buscar información extra", + "default": true, + "enabled": true, + "visible": true + }, + { + "id": "comprueba_enlaces", + "type": "bool", + "label": "Verificar si los enlaces existen", + "default": false, + "enabled": true, + "visible": true + }, + { + "id": "comprueba_enlaces_num", + "type": "list", + "label": "Número de enlaces a verificar", + "default": 1, + "enabled": true, + "visible": "eq(-1,true)", + "lvalues": [ "5", "10", "15", "20" ] + }, + { + "id": "perfil", + "type": "list", + "label": "Perfil de color", + "default": 2, + "enabled": true, + "visible": true, + "lvalues": [ + "Perfil 3", + "Perfil 2", + "Perfil 1", + "Ninguno" + ] + }, + { + "id": "menu_info", + "type": "bool", + "label": "Mostrar menú intermedio película/episodio", + "default": false, + "enabled": false, + "visible": false + }, + { + "id": "last_page", + "type": "bool", + "label": "Ocultar opción elegir página en películas (Kodi)", + "default": false, + "enabled": true, + "visible": true + }, + { + "id": "filtro_defecto_peliculas", + "type": "label", + "enabled": true, + "visible": false + }, + { + "id": "pers_peliculas1", + "type": "label", + "enabled": true, + "visible": false + }, + { + "id": "pers_peliculas2", + "type": "label", + "enabled": true, + "visible": false + }, + { + "pers_peliculas3": { + "type": "label", + "enabled": true, + "visible": false + } + }, + { + "id": "filtro_defecto_series", + "type": "label", + "enabled": true, + "visible": false + }, + { + "id": "pers_series1", + "type": "label", + "enabled": true, + "visible": false + }, + { + "id": "pers_series2", + "type": "label", + "enabled": true, + "visible": false + }, + { + "id": "pers_series3", + "type": "label", + "enabled": true, + "visible": false + }, + { + "id": "last_search", + "type": "text", + "enabled": true, + "visible": false + } + ] +} diff --git a/plugin.video.alfa/channels/gnula_biz.py b/plugin.video.alfa/channels/gnula_biz.py new file mode 100644 index 00000000..abca733c --- /dev/null +++ b/plugin.video.alfa/channels/gnula_biz.py @@ -0,0 +1,780 @@ +# -*- coding: utf-8 -*- + +import re +import urlparse + +from core import httptools +from core import jsontools +from core import scrapertools +from core import servertools +from core import tmdb +from core.item import Item +from platformcode import config, logger +from channelselector import get_thumb +from channels import autoplay +from channels import filtertools + +IDIOMAS = {'Latino': 'LAT', 'Castellano':'CAST', 'Vo':'VO', 'Vose': 'VOSE'} +list_language = IDIOMAS.values() +list_quality = [] +list_servers = ['openload', 'powvideo', 'rapidvideo', 'streamango', 'streamcloud', 'flashx', 'gamovideo', 'streamplay'] + +__modo_grafico__ = config.get_setting('modo_grafico', 'gnula_biz') +__perfil__ = int(config.get_setting('perfil', "gnula_biz")) +__menu_info__ = config.get_setting('menu_info', 'gnula_biz') +__comprueba_enlaces__ = config.get_setting('comprueba_enlaces', 'gnula_biz') +__comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', 'gnula_biz') + +# Fijar perfil de color +perfil = [['0xFFFFE6CC', '0xFFFFCE9C', '0xFF994D00', '0xFFFE2E2E', '0xFF088A08'], + ['0xFFA5F6AF', '0xFF5FDA6D', '0xFF11811E', '0xFFFE2E2E', '0xFF088A08'], + ['0xFF58D3F7', '0xFF2E9AFE', '0xFF2E64FE', '0xFFFE2E2E', '0xFF088A08']] + +if __perfil__ < 3: + color1, color2, color3, color4, color5 = perfil[__perfil__] +else: + color1 = color2 = color3 = color4 = color5 = "" + +host = "http://gnula.biz" + +def mainlist(item): + logger.info() + item.text_color = color1 + itemlist = [] + + autoplay.init(item.channel, list_servers, list_quality) + + itemlist.append(item.clone(action="seccion_peliculas", title="Películas", fanart="http://i.imgur.com/PjJaW8o.png", + url=host + "/catalogue?type=peliculas", thumbnail=get_thumb('movies', auto=True))) + # Seccion series + itemlist.append(item.clone(action="seccion_series", title="Series", + url=host + "/ultimos-capitulos", fanart="http://i.imgur.com/9loVksV.png", + thumbnail=get_thumb('tvshows', auto=True))) + + itemlist.append(item.clone(action="peliculas", title="Documentales", fanart="http://i.imgur.com/Q7fsFI6.png", + url=host + "/catalogue?type=peliculas&genre=documental", + thumbnail=get_thumb('documentaries', auto=True))) + + if config.get_setting("adult_mode") != 0: + itemlist.append(item.clone(action="peliculas", title="Sección Adultos +18", + url=host + "/catalogue?type=adultos", + fanart="http://i.imgur.com/kIvE1Zh.png", thumbnail=get_thumb('adults', auto=True))) + + itemlist.append(item.clone(title="Buscar...", action="local_search", thumbnail=get_thumb('search', auto=True))) + itemlist.append(item.clone(title="Configurar canal...", text_color="gold", action="configuracion", folder=False)) + + autoplay.show_option(item.channel, itemlist) + + return itemlist + +def configuracion(item): + from platformcode import platformtools + ret = platformtools.show_channel_settings() + platformtools.itemlist_refresh() + return ret + +def search(item, texto): + logger.info() + texto = texto.replace(" ", "+") + item.url = host + "/search?q=%s" % texto + try: + return busqueda(item) + # Se captura la excepción, para no interrumpir al buscador global si un canal falla + except: + import sys + for line in sys.exc_info(): + logger.error("%s" % line) + return [] + +def local_search(item): + logger.info() + text = "" + if config.get_setting("save_last_search", item.channel): + text = config.get_setting("last_search", item.channel) + from platformcode import platformtools + texto = platformtools.dialog_input(default=text, heading="Buscar en Gnula.Biz") + if texto is None: + return + + if config.get_setting("save_last_search", item.channel): + config.set_setting("last_search", texto, item.channel) + + return search(item, texto) + +def busqueda(item): + logger.info() + itemlist = [] + + data = httptools.downloadpage(item.url).data + patron = '
(.*?)(?:
  • |