Community Channels:

Fix Aggiungi alla videoteca e Download
This commit is contained in:
Alhaziel01
2020-07-28 19:37:28 +02:00
parent 105d88608c
commit 7bf8a9184c
3 changed files with 31 additions and 16 deletions
+19 -11
View File
@@ -255,7 +255,7 @@ def get_seasons(item):
action='episodios',
contentSeason=option['season'],
infoLabels=infoLabels,
contentType='season',
contentType='season' if show_seasons else 'tvshow',
path=extra.path))
if inspect.stack()[2][3] in ['add_tvshow', 'get_episodes', 'update', 'find_episodes', 'get_newest'] or show_seasons == False:
@@ -265,6 +265,10 @@ def get_seasons(item):
itemlist = itlist
if inspect.stack()[2][3] not in ['add_tvshow', 'get_episodes', 'update', 'find_episodes', 'get_newest'] and defp and not item.disable_pagination:
itemlist = pagination(item, itemlist)
if show_seasons:
support.videolibrary(itemlist, item)
support.download(itemlist, item)
return itemlist
@@ -353,16 +357,17 @@ def episodios(item, json ='', key='', itemlist =[]):
itemlist = []
for season in season_list:
itemlist.append(Item(channel=item.channel,
title=set_title(config.get_localized_string(60027) % season),
fulltitle=itm.fulltitle,
show=itm.show,
thumbnails=itm.thumbnails,
url=itm.url,
action='episodios',
contentSeason=season,
infoLabels=infoLabels,
filterseason=str(season),
path=item.path))
title=set_title(config.get_localized_string(60027) % season),
fulltitle=itm.fulltitle,
show=itm.show,
thumbnails=itm.thumbnails,
url=itm.url,
action='episodios',
contentSeason=season,
contentType = 'episode',
infoLabels=infoLabels,
filterseason=str(season),
path=item.path))
elif defp and inspect.stack()[1][3] not in ['get_seasons'] and not item.disable_pagination:
if Pagination and len(itemlist) >= Pagination:
@@ -371,6 +376,9 @@ def episodios(item, json ='', key='', itemlist =[]):
item.page = pag + 1
item.thumbnail = support.thumb()
itemlist.append(item)
if not show_seasons:
support.videolibrary(itemlist, item)
support.download(itemlist, item)
return itemlist
+3 -2
View File
@@ -840,7 +840,7 @@ def start_download(item):
def get_episodes(item):
log("contentAction: %s | contentChannel: %s | contentType: %s" % (item.contentAction, item.contentChannel, item.contentType))
if 'dlseason' in item:
season = True
season_number = item.dlseason
@@ -864,8 +864,9 @@ def get_episodes(item):
episodes = getattr(channel, item.contentAction)(item)
itemlist = []
if episodes and not scrapertools.find_single_match(episodes[0].title, r'(\d+.\d+)') and item.channel not in ['videolibrary']:
if episodes and not scrapertools.find_single_match(episodes[0].title, r'(\d+.\d+)') and item.channel not in ['videolibrary'] and item.action != 'season':
from specials.autorenumber import select_type, renumber, check
# support.dbg()
if not check(item):
select_type(item)
return get_episodes(item)