From dc6e06647feb0bb1584ec1b7b6727e0f590ddc2c Mon Sep 17 00:00:00 2001 From: marco Date: Mon, 24 Jun 2019 21:10:12 +0200 Subject: [PATCH] fix autoplay in community channels --- specials/autoplay.py | 5 ++++- specials/community.py | 7 +++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/specials/autoplay.py b/specials/autoplay.py index b6c851ce..451f18e3 100644 --- a/specials/autoplay.py +++ b/specials/autoplay.py @@ -299,7 +299,10 @@ def start(itemlist, item): # Intenta reproducir los enlaces # Si el canal tiene metodo play propio lo utiliza - channel = __import__('channels.%s' % channel_id, None, None, ["channels.%s" % channel_id]) + try: + channel = __import__('channels.%s' % channel_id, None, None, ["channels.%s" % channel_id]) + except: + channel = __import__('specials.%s' % channel_id, None, None, ["specials.%s" % channel_id]) if hasattr(channel, 'play'): resolved_item = getattr(channel, 'play')(videoitem) if len(resolved_item) > 0: diff --git a/specials/community.py b/specials/community.py index 4a1e88e4..fdf41330 100644 --- a/specials/community.py +++ b/specials/community.py @@ -20,8 +20,8 @@ from specials import filtertools list_data = {} -list_language = ['LAT', 'CAST', 'VO', 'VOSE'] -list_servers = ['directo'] +list_language = ['ITA', 'SUB-ITA'] +list_servers = ['directo', 'akvideo', 'verystream', 'openload'] list_quality = ['SD', '720', '1080', '4k'] def mainlist(item): @@ -52,7 +52,6 @@ def show_channels(item): itemlist.append(Item(channel=item.channel, title=config.get_localized_string(70676), action='add_channel', thumbnail=get_thumb('add.png'))) for key, channel in json['channels'].items(): - file_path = channel ['path'] file_url = httptools.downloadpage(file_path, follow_redirects=True).data json_url = jsontools.load(file_url) @@ -67,7 +66,7 @@ def show_channels(item): action='show_menu', channel_id = key, context=context)) - return itemlist + return itemlist def load_json(item): logger.info()