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