From d011a9ae753f82f424df487a498dd4af55f597fe Mon Sep 17 00:00:00 2001 From: Alhaziel Date: Wed, 22 Jan 2020 20:34:18 +0100 Subject: [PATCH 1/3] Fix Community Channel --- specials/community.py | 69 ++++++++++++++++++++++++------------------- 1 file changed, 39 insertions(+), 30 deletions(-) diff --git a/specials/community.py b/specials/community.py index 4eaf0532..2594b967 100644 --- a/specials/community.py +++ b/specials/community.py @@ -57,38 +57,44 @@ def show_channels(item): for key, channel in json['channels'].items(): # Find File Path - if 'http' in channel['path']: file_path = httptools.downloadpage(channel['path'],follow_redirects=True).url + if 'http' in channel['path']: + try: + file_path = httptools.downloadpage(channel['path'], follow_redirects=True, timeout=5).url + except: + support.log('Offline') + file_path = None else: file_path = channel['path'] - # make relative path - path = os.path.dirname(os.path.abspath(file_path)) - if 'http' in path: path = path[path.find('http'):].replace('\\','/').replace(':/','://') - if file_path.startswith('http'): file_url = httptools.downloadpage(file_path, follow_redirects=True).data - elif os.path.isfile(file_path): file_url = open(file_path, "r").read() - else: - item.channel_id = key - remove_channel(item) - file_url='' + if file_path: + # make relative path + path = os.path.dirname(os.path.abspath(file_path)) + if 'http' in path: path = path[path.find('http'):].replace('\\','/').replace(':/','://') + if file_path.startswith('http'): file_url = httptools.downloadpage(file_path, follow_redirects=True).data + elif os.path.isfile(file_path): file_url = open(file_path, "r").read() + else: + item.channel_id = key + remove_channel(item) + file_url='' - # load json - if file_url: - json_url = jsontools.load(file_url) + # load json + if file_url: + json_url = jsontools.load(file_url) - thumbnail = relative('thumbnail', json_url, path) - if not thumbnail: thumbnail = item.thumbnail - fanart = relative('fanart', json_url, path) - plot = json_url['plot'] if json_url.has_key('plot') else '' + thumbnail = relative('thumbnail', json_url, path) + if not thumbnail: thumbnail = item.thumbnail + fanart = relative('fanart', json_url, path) + plot = json_url['plot'] if json_url.has_key('plot') else '' - itemlist.append(Item(channel=item.channel, - title=typo(channel['channel_name'],'bold'), - url=file_path, - thumbnail=thumbnail, - fanart=fanart, - plot=plot, - action='show_menu', - channel_id = key, - context=context, - path=path)) + itemlist.append(Item(channel=item.channel, + title=typo(channel['channel_name'],'bold'), + url=file_path, + thumbnail=thumbnail, + fanart=fanart, + plot=plot, + action='show_menu', + channel_id = key, + context=context, + path=path)) autoplay.show_option(item.channel, itemlist) support.channel_config(item, itemlist) @@ -490,6 +496,7 @@ def get_seasons(item): fulltitle=item.fulltitle, show=item.show, thumbnails=item.thumbnails, + filterseason=str(season['season']), url=url, action='episodios', contentSeason=season['season'], @@ -528,9 +535,10 @@ def get_seasons(item): def episodios(item): - support.log() + support.log(item) itm = item + if inspect.stack()[1][3] not in ['add_tvshow', 'get_episodes', 'update', 'find_episodes']: pagination = int(defp) if defp.isdigit() else '' else: pagination = '' @@ -573,7 +581,8 @@ def episodios(item): title = ' - ' + episode['title'] if episode.has_key('title') else '' title = '%sx%s%s' % (season_number, episode_number, title) - if season_number == item.filter or not item.filterseason: + + if season_number == item.filterseason or not item.filterseason: itemlist.append(Item(channel= item.channel, title= format_title(title), fulltitle = item.fulltitle, @@ -606,7 +615,7 @@ def episodios(item): action='episodios', contentSeason=season, infoLabels=infoLabels, - filterseason=season, + filterseason=str(season), path=item.path)) elif pagination and len(json_data['episodes_list']) >= pag * pagination: From b3006183cc71338945d9c9febe1a201828660190 Mon Sep 17 00:00:00 2001 From: Alhaziel Date: Wed, 22 Jan 2020 20:56:32 +0100 Subject: [PATCH 2/3] Fix Dreamsub --- channels/dreamsub.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/channels/dreamsub.py b/channels/dreamsub.py index a9c0889f..55fe3bfe 100644 --- a/channels/dreamsub.py +++ b/channels/dreamsub.py @@ -111,15 +111,15 @@ def findvideos(item): itemlist = [] support.log() - matches = support.match(item, patron=r' Date: Thu, 23 Jan 2020 12:23:04 +0100 Subject: [PATCH 3/3] Fix Il Genio dello Streaming --- channels/ilgeniodellostreaming.py | 79 +++---------------------------- 1 file changed, 6 insertions(+), 73 deletions(-) diff --git a/channels/ilgeniodellostreaming.py b/channels/ilgeniodellostreaming.py index 2c7fb457..bb347e0e 100644 --- a/channels/ilgeniodellostreaming.py +++ b/channels/ilgeniodellostreaming.py @@ -4,32 +4,6 @@ # Canale per ilgeniodellostreaming # ------------------------------------------------------------ -""" - - Alcuni video non si aprono sul sito... - - Avvisi per il test: - i link per le categorie non sono TUTTI visibili nella pagina del sito: - vanno costruiti con i nomi dei generi che vedete nel CANALE. - Es: - https://ilgeniodellostreaming.se/genere/+ genere nel canale - genere-> kids - https://ilgeniodellostreaming.se/genere/kids - genere-> avventura - https://ilgeniodellostreaming.se/genere/avventura - Se il genere è formato da 2 parola lo spazio si trasforma in - - genere-> televisione film - https://ilgeniodellostreaming.se/genere/televisione-film - - Novità -> Serietv e Aggiornamenti nel canale: - - le pagine sono di 25 titoli - - - ##### note per i dev ######### - - La pagina "Aggiornamenti Anime" del sito è vuota (update 13-9-2019) - - in url: film o serietv - -""" import re @@ -68,7 +42,7 @@ def mainlist(item): ] Tvshow = [ - ('Show TV', ['/tv-show/', 'peliculas', '', 'tvshow']) + ('Show TV bullet bold', ['/tv-show/', 'peliculas', '', 'tvshow']) ] search = '' @@ -81,21 +55,11 @@ def peliculas(item): log() if item.args == 'search': - patronBlock = r'
(?P.*?)