From a9a1043e5d34f4476496c91d4cc37a055086e673 Mon Sep 17 00:00:00 2001 From: Alhaziel Date: Thu, 8 Aug 2019 19:48:34 +0200 Subject: [PATCH] Fix autorenumber e support --- core/support.py | 18 +++++++++--------- specials/autorenumber.py | 4 ++++ 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/core/support.py b/core/support.py index 67996042..77d8ea14 100644 --- a/core/support.py +++ b/core/support.py @@ -247,7 +247,7 @@ def scrapeBlock(item, args, block, patron, headers, action, pagination, debug, t if scraped['type'] in variants: action = name - if ((scraped["title"] not in blacklist) or longtitle) and search.lower() in longtitle.lower(): + if (scraped["title"] not in blacklist) and (search.lower() in longtitle.lower()): it = Item( channel=item.channel, action=action, @@ -271,7 +271,7 @@ def scrapeBlock(item, args, block, patron, headers, action, pagination, debug, t if 'itemHook' in args: it = args['itemHook'](it) itemlist.append(it) - + return itemlist, matches @@ -354,13 +354,13 @@ def scrape(func): elif patron: itemlist, matches = scrapeBlock(item, args, data, patron, headers, action, pagination, debug, typeContentDict, typeActionDict, blacklist, search, pag, function) - + checkHost(item, itemlist) - if (item.contentType == "tvshow" and (action != "findvideos" and action != "play")) \ - or (item.contentType == "episode" and action != "play") \ - or (item.contentType == "movie" and action != "play") : - # if action != 'play' or (item.contentType == "tvshow" and action != "findvideos"): + # if (item.contentType == "tvshow" and (action != "findvideos" and action != "play")) \ + # or (item.contentType == "episode" and action != "play") \ + # or (item.contentType == "movie" and action != "play") : + if action != 'play': tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True) # else: # Si perde item show :( # for it in itemlist: @@ -560,7 +560,7 @@ def menuItem(itemlist, filename, title='', action='', url='', contentType='movie args = args, contentType = contentType )) - + # Apply auto Thumbnails at the menus from channelselector import thumb thumb(itemlist) @@ -627,7 +627,7 @@ def menu(func): contentType= var[3] if len(var) > 3 else 'movie' if name == 'film' else 'tvshow',) # add search menu for category if 'search' not in args: menuItem(itemlist, filename, 'Cerca ' + title + '… submenu bold', 'search', host + url, args=name) - + # Make EXTRA MENU (on bottom) for name, var in args.items(): if name not in listUrls and name != 'item': diff --git a/specials/autorenumber.py b/specials/autorenumber.py index b8f2603f..c41ab1cc 100644 --- a/specials/autorenumber.py +++ b/specials/autorenumber.py @@ -323,6 +323,10 @@ def make_list(itemlist, item, typography, dict_series, ID, SEASON, EPISODE, MODE addiction = 0 for item in itemlist: # Otiene Numerazione Episodi + if scrapertoolsV2.find_single_match(item.title, r'\d+'): + continue + else: + break episode = int(scrapertoolsV2.find_single_match(item.title, r'\d+')) number = episode + FirstOfSeason - addiction count = number + addiction