Fix for videolibrary function

This commit is contained in:
Alhaziel
2019-05-13 10:31:12 +02:00
parent d25b90eebe
commit a24cf52798

View File

@@ -438,7 +438,7 @@ def match(item, patron='', patron_block='', headers='', url=''):
def videolibrary(itemlist, item, typography=''):
if item.contentType != 'episode':
if item.contentType == 'movie':
action = 'add_pelicula_to_library'
extra = 'findvideos'
contentType = 'movie'
@@ -448,17 +448,18 @@ def videolibrary(itemlist, item, typography=''):
contentType = 'tvshow'
title = typo(config.get_localized_string(30161) + ' ' + typography)
if config.get_videolibrary_support() and len(itemlist) > 0:
itemlist.append(
Item(channel=item.channel,
title=title,
contentType=contentType,
contentSerieName=item.fulltitle if contentType == 'tvshow' else '',
url=item.url,
action=action,
extra=extra,
contentTitle=item.fulltitle))
if inspect.stack()[1][3] == 'findvideos' and contentType == 'movie' or inspect.stack()[1][3] != 'findvideos' and contentType != 'movie':
if config.get_videolibrary_support() and len(itemlist) > 0:
itemlist.append(
Item(channel=item.channel,
title=title,
contentType=contentType,
contentSerieName=item.fulltitle if contentType == 'tvshow' else '',
url=item.url,
action=action,
extra=extra,
contentTitle=item.fulltitle))
return itemlist
def nextPage(itemlist, item, data, patron, function_level=1):
# Function_level is useful if the function is called by another function.