fix autoplay in videoteca
This commit is contained in:
+1
-1
@@ -994,7 +994,7 @@ def controls(itemlist, item, AutoPlay=True, CheckLinks=True, down_load=True):
|
|||||||
checklinks_number = get_setting('checklinks_number')
|
checklinks_number = get_setting('checklinks_number')
|
||||||
itemlist = servertools.check_list_links(itemlist, checklinks_number)
|
itemlist = servertools.check_list_links(itemlist, checklinks_number)
|
||||||
|
|
||||||
if AutoPlay == True and not 'downloads' in inspect.stack()[3][1] + inspect.stack()[4][1]:
|
if AutoPlay == True and not 'downloads' in inspect.stack()[3][1] + inspect.stack()[4][1] and item.contentChannel != 'videolibrary':
|
||||||
autoplay.start(itemlist, item)
|
autoplay.start(itemlist, item)
|
||||||
|
|
||||||
if item.contentChannel != 'videolibrary': videolibrary(itemlist, item, function_level=3)
|
if item.contentChannel != 'videolibrary': videolibrary(itemlist, item, function_level=3)
|
||||||
|
|||||||
@@ -97,7 +97,6 @@ def start(itemlist, item):
|
|||||||
#platformtools.dialog_notification('AutoPlay ERROR', 'Sólo disponible para XBMC/Kodi')
|
#platformtools.dialog_notification('AutoPlay ERROR', 'Sólo disponible para XBMC/Kodi')
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
if not autoplay_node:
|
if not autoplay_node:
|
||||||
# Obtiene el nodo AUTOPLAY desde el json
|
# Obtiene el nodo AUTOPLAY desde el json
|
||||||
autoplay_node = jsontools.get_node_from_file('autoplay', 'AUTOPLAY')
|
autoplay_node = jsontools.get_node_from_file('autoplay', 'AUTOPLAY')
|
||||||
@@ -707,17 +706,15 @@ def set_status(status):
|
|||||||
def play_multi_channel(item, itemlist):
|
def play_multi_channel(item, itemlist):
|
||||||
logger.info()
|
logger.info()
|
||||||
global PLAYED
|
global PLAYED
|
||||||
actual_channel = ''
|
|
||||||
channel_videos = []
|
|
||||||
video_dict = dict()
|
video_dict = dict()
|
||||||
set_status(True)
|
set_status(True)
|
||||||
|
|
||||||
for video_item in itemlist:
|
for video_item in itemlist:
|
||||||
if video_item.contentChannel != actual_channel:
|
if is_active(video_item.contentChannel):
|
||||||
actual_channel = video_item.contentChannel
|
if video_item.contentChannel not in video_dict.keys():
|
||||||
elif is_active(actual_channel):
|
video_dict[video_item.contentChannel] = [video_item]
|
||||||
channel_videos.append(video_item)
|
else:
|
||||||
video_dict[actual_channel] = channel_videos
|
video_dict[video_item.contentChannel].append(video_item)
|
||||||
|
|
||||||
for channel, videos in video_dict.items():
|
for channel, videos in video_dict.items():
|
||||||
item.contentChannel = channel
|
item.contentChannel = channel
|
||||||
|
|||||||
Reference in New Issue
Block a user