From a5a110c987ac1e6ecf43e51a1a089239b474f669 Mon Sep 17 00:00:00 2001 From: greko17 <50103632+greko17@users.noreply.github.com> Date: Sat, 4 May 2019 15:54:47 +0200 Subject: [PATCH] Riscrittura canali alla KOD MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modificate alcune voci alla maniera di KOD. Da ultimare perchè le voci nel menu: lettera e anno non danno le giuste icone... --- channels/altadefinizione01_club.json | 16 ---- channels/altadefinizione01_club.py | 122 ++++++--------------------- 2 files changed, 26 insertions(+), 112 deletions(-) diff --git a/channels/altadefinizione01_club.json b/channels/altadefinizione01_club.json index 4c4d2fa3..62672c18 100644 --- a/channels/altadefinizione01_club.json +++ b/channels/altadefinizione01_club.json @@ -71,22 +71,6 @@ "Non filtrare", "IT" ] - }, - { - "id": "perfil", - "type": "list", - "label": "profilo dei colori", - "default": 0, - "enabled": true, - "visible": true, - "lvalues": [ - "Sin color", - "Perfil 5", - "Perfil 4", - "Perfil 3", - "Perfil 2", - "Perfil 1" - ] } ] } diff --git a/channels/altadefinizione01_club.py b/channels/altadefinizione01_club.py index 7969deb5..bfc3e4f3 100644 --- a/channels/altadefinizione01_club.py +++ b/channels/altadefinizione01_club.py @@ -5,7 +5,7 @@ # -*- last change: 3/05/2019 from channelselector import get_thumb -from channels import autoplay +from channels import autoplay, support from channels import filtertools from core import httptools from core import scrapertools @@ -20,23 +20,7 @@ __channel__ = "altadefinizione01_club" #host = "https://www.altadefinizione01.club/" # host da cambiare #host = "https://www.altadefinizione01.team/" #aggiornato al 22 marzo 2019 host = "https://www.altadefinizione01.vision/" #aggiornato al 30-04-209 -# ======== def per utility INIZIO ============================= -try: - __modo_grafico__ = config.get_setting('modo_grafico', __channel__) - __perfil__ = int(config.get_setting('perfil', __channel__)) -except: - __modo_grafico__ = True - __perfil__ = 0 - -# Fijar perfil de color -perfil = [['0xFFFFE6CC', '0xFFFFCE9C', '0xFF994D00', '0xFFFE2E2E', '0xFFFFD700'], - ['0xFFA5F6AF', '0xFF5FDA6D', '0xFF11811E', '0xFFFE2E2E', '0xFFFFD700'], - ['0xFF58D3F7', '0xFF2E9AFE', '0xFF2E64FE', '0xFFFE2E2E', '0xFFFFD700']] - -if __perfil__ < 3: - color1, color2, color3, color4, color5 = perfil[__perfil__] -else: - color1 = color2 = color3 = color4 = color5 = "" +# ======== Funzionalità ============================= __comprueba_enlaces__ = config.get_setting('comprueba_enlaces', __channel__) __comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', __channel__) @@ -44,9 +28,9 @@ __comprueba_enlaces_num__ = config.get_setting('comprueba_enlaces_num', __channe headers = [['User-Agent', 'Mozilla/50.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0'], ['Referer', host]] -#parameters = channeltools.get_channel_parameters(__channel__) -#fanart_host = parameters['fanart'] -#thumbnail_host = parameters['thumbnail'] +parameters = channeltools.get_channel_parameters(__channel__) +fanart_host = parameters['fanart'] +thumbnail_host = parameters['thumbnail'] IDIOMAS = {'Italiano': 'IT'} list_language = IDIOMAS.values() @@ -62,57 +46,19 @@ def mainlist(item): :param item: :return: itemlist [] """ - logger.info("%s mainlist log: %s" % (__channel__, item)) + logger.info("%s mainlist log: %s" % (__channel__, item)) itemlist = [] - title = '' autoplay.init(item.channel, list_servers, list_quality) - - itemlist = [ - # new upload - Item(channel=__channel__, title="Ultimi Arrivi", action="peliculas", - url="%s" % host, text_color=color4, extra="film", - infoLabels={'plot': item.category}, - thumbnail=get_thumb(title, auto = True) - ), - # x to Cinema - Item(channel=__channel__, title="Al Cinema", action="peliculas", - url="%scinema/" % host, text_color=color4, extra="film", - infoLabels={'plot': item.category}, - thumbnail = get_thumb(title, auto = True) - ), - # x Sub-ita - Item(channel=__channel__, title="Sottotitolati", action="peliculas", - url="%ssub-ita/" % host, text_color=color4, extra="film", - infoLabels={'plot': item.category}, - thumbnail = get_thumb(title, auto = True) - ), - # x Category - Item(channel=__channel__, title="Generi", action="categorie", - url="%s" % host, text_color=color4, extra="genres", - viewcontent='movies', - infoLabels={'plot': item.category}, - thumbnail = get_thumb(title, auto = True) - ), - # x year - Item(channel=__channel__, title="Anno", action="categorie", - url="%s" % host, text_color=color4, extra="year", - infoLabels={'plot': item.category}, - thumbnail = get_thumb(title, auto = True) - ), - # x lettera - Item(channel=__channel__, title="Lettera", action="categorie", - url="%scatalog/a/" % host, text_color=color4, extra="orderalf", - infoLabels={'plot': item.category}, - thumbnail = get_thumb(title, auto = True) - ), - # Search - Item(channel=__channel__, title="Cerca Film...", action="search", - text_color=color4, extra="", - infoLabels={'plot': item.category}, - thumbnail = get_thumb(title, auto = True) - ), - ] + + # Menu Principale + support.menu(itemlist, 'Novità bold', 'peliculas', host+'', args='pellicola') + support.menu(itemlist, 'Genere submenu', 'categorie', host, args='genres') + support.menu(itemlist, 'Anno', 'categorie', host)#, args='years') + support.menu(itemlist, 'Lettera', 'categorie', host+'catalog/a/', args='orderalf') + support.menu(itemlist, 'Al Cinema bold', 'peliculas', host+'cinema/', args='pellicola') + support.menu(itemlist, 'Sub-ITA bold', 'peliculas', host+'sub-ita/', args='pellicola') + support.menu(itemlist, 'Cerca film submenu', 'search', host)#, args='orderalf') autoplay.show_option(item.channel, itemlist) @@ -127,10 +73,10 @@ def peliculas(item): # scarico la pagina data = httptools.downloadpage(item.url, headers=headers).data # da qui fare le opportuni modifiche - if item.extra != 'orderalf': - if item.extra == 'film' or item.extra == 'year': + if item.args != 'orderalf': + if item.args == 'pellicola' or item.extra == 'years': bloque = scrapertools.find_single_match(data, '