From c55a3f444f2e95fcd15e292661be3be736eda77f Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Wed, 16 Dec 2020 11:25:56 +0100 Subject: [PATCH] fix Autorenumber --- channels/animeunity.py | 5 +++-- channels/paramount.py | 5 +++-- channels/raiplay.py | 4 ++-- channels/vvvvid.py | 5 +++-- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/channels/animeunity.py b/channels/animeunity.py index a434acea..91248922 100644 --- a/channels/animeunity.py +++ b/channels/animeunity.py @@ -3,7 +3,7 @@ # Canale per AnimeUnity # ------------------------------------------------------------ -import requests, json, copy +import requests, json, copy, inspect from core import support from platformcode import autorenumber @@ -212,7 +212,8 @@ def episodios(item): contentType='episode', url=it['link'])) - autorenumber.start(itemlist, item) + if inspect.stack()[1][3] not in ['find_episodes']: + autorenumber.start(itemlist, item) support.videolibrary(itemlist, item) support.download(itemlist, item) return itemlist diff --git a/channels/paramount.py b/channels/paramount.py index 024618cf..cf2bf192 100644 --- a/channels/paramount.py +++ b/channels/paramount.py @@ -105,7 +105,7 @@ def peliculas(item): if pagination and len(itemlist) >= item.page * pagination and not item.search: itlist.append(item.clone(channel=item.channel, action = 'peliculas', title=support.typo(support.config.get_localized_string(30992), 'color kod bold'), page=item.page + 1, thumbnail=support.thumb())) itemlist = itlist - autorenumber.renumber(itemlist, item, 'bold') + autorenumber.start(itemlist) return itemlist @@ -156,7 +156,8 @@ def episodios(item): action='findvideos')) itemlist.sort(key=lambda item: (item.season, item.episode)) - autorenumber.renumber(itemlist, item, 'bold') + if inspect.stack()[1][3] not in ['find_episodes']: + autorenumber.start(itemlist, item) return support.videolibrary(itemlist, item) diff --git a/channels/raiplay.py b/channels/raiplay.py index 66a0ae2a..73c90a7e 100644 --- a/channels/raiplay.py +++ b/channels/raiplay.py @@ -3,7 +3,7 @@ # Canale per Rai Play # ------------------------------------------------------------ -import requests, sys +import requests, sys, inspect from core import support from platformcode import autorenumber if sys.version_info[0] >= 3: @@ -297,7 +297,7 @@ def episodios(item): it.title = support.typo(item.season + 'x' + episode, 'bold') + (' - ' + it.title) if itemlist and itemlist[0].VL: support.videolibrary(itemlist, item) - if itemlist and not support.match(itemlist[0].title, patron=r'[Ss]?(\d+)(?:x|_|\.|\s+)[Ee]?[Pp]?(\d+)').match: + if itemlist and not support.match(itemlist[0].title, patron=r'[Ss]?(\d+)(?:x|_|\.|\s+)[Ee]?[Pp]?(\d+)').match and inspect.stack()[1][3] not in ['find_episodes']: autorenumber.start(itemlist, item) return itemlist diff --git a/channels/vvvvid.py b/channels/vvvvid.py index 20b0248a..ef7a2b64 100644 --- a/channels/vvvvid.py +++ b/channels/vvvvid.py @@ -2,7 +2,7 @@ # ------------------------------------------------------------ # Canale per vvvvid # ---------------------------------------------------------- -import requests, sys +import requests, sys, inspect from core import support, tmdb from platformcode import autorenumber, logger @@ -170,7 +170,8 @@ def episodios(item): url= host + show_id + '/season/' + str(key['season_id']), action= 'findvideos', video_id= key['video_id'])) - autorenumber.start(itemlist, item) + if inspect.stack()[1][3] not in ['find_episodes']: + autorenumber.start(itemlist, item) if autorenumber.check(item) == True \ or support.match(itemlist[0].title, patron=r"(\d+x\d+)").match: support.videolibrary(itemlist,item)