fix autoplay in community channels
This commit is contained in:
@@ -299,7 +299,10 @@ def start(itemlist, item):
|
|||||||
|
|
||||||
# Intenta reproducir los enlaces
|
# Intenta reproducir los enlaces
|
||||||
# Si el canal tiene metodo play propio lo utiliza
|
# 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'):
|
if hasattr(channel, 'play'):
|
||||||
resolved_item = getattr(channel, 'play')(videoitem)
|
resolved_item = getattr(channel, 'play')(videoitem)
|
||||||
if len(resolved_item) > 0:
|
if len(resolved_item) > 0:
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ from specials import filtertools
|
|||||||
|
|
||||||
list_data = {}
|
list_data = {}
|
||||||
|
|
||||||
list_language = ['LAT', 'CAST', 'VO', 'VOSE']
|
list_language = ['ITA', 'SUB-ITA']
|
||||||
list_servers = ['directo']
|
list_servers = ['directo', 'akvideo', 'verystream', 'openload']
|
||||||
list_quality = ['SD', '720', '1080', '4k']
|
list_quality = ['SD', '720', '1080', '4k']
|
||||||
|
|
||||||
def mainlist(item):
|
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')))
|
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():
|
for key, channel in json['channels'].items():
|
||||||
|
|
||||||
file_path = channel ['path']
|
file_path = channel ['path']
|
||||||
file_url = httptools.downloadpage(file_path, follow_redirects=True).data
|
file_url = httptools.downloadpage(file_path, follow_redirects=True).data
|
||||||
json_url = jsontools.load(file_url)
|
json_url = jsontools.load(file_url)
|
||||||
@@ -67,7 +66,7 @@ def show_channels(item):
|
|||||||
action='show_menu',
|
action='show_menu',
|
||||||
channel_id = key,
|
channel_id = key,
|
||||||
context=context))
|
context=context))
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
def load_json(item):
|
def load_json(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
|
|||||||
Reference in New Issue
Block a user