From 345cb3a626987f4f8da66c53635223fdc4c6e542 Mon Sep 17 00:00:00 2001 From: mac12m99 <10120390+mac12m99@users.noreply.github.com> Date: Thu, 18 Feb 2021 21:46:42 +0100 Subject: [PATCH] ricerca: prova anno nel titolo con i film + nuovo metodo per ricerca su toonitalia (attesa di nuova regex) --- channels/toonitalia.py | 17 +++-------------- specials/globalsearch.py | 2 ++ 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/channels/toonitalia.py b/channels/toonitalia.py index 47dbaec7..773075ea 100644 --- a/channels/toonitalia.py +++ b/channels/toonitalia.py @@ -33,22 +33,10 @@ def search(item, text): support.info(text) # item.args='search' item.text = text - itemlist = [] - itlist = [] + item.url = item.url + '/?a=b&s=' + text.replace(' ', '+') try: - # item.url = host + '/lista-serie-tv/' - # item.contentType = 'tvshow' - # itemlist += peliculas(item) - with futures.ThreadPoolExecutor() as executor: - for par in [['/serie-tv/', 'tvshow', ''],['/anime/', 'tvshow', ''], ['/-anime-sub-ita/', 'tvshow', 'sub'], ['/film-animazione/', 'movie', '']]: - item.url = host + par[0] - item.contentType = par[1] - item.args = par[2] - itlist.append(executor.submit(peliculas, item)) - for res in futures.as_completed(itlist): - itemlist += res.result() - return itemlist + return peliculas(item) # Continua la ricerca in caso di errore except: import sys @@ -75,6 +63,7 @@ def newest(categoria): @support.scrape def peliculas(item): + # debugBlock = True search = item.text if item.contentType != 'movie': anime = True action = 'findvideos' if item.contentType == 'movie' else 'episodios' diff --git a/specials/globalsearch.py b/specials/globalsearch.py index 4e766243..33b6e2b2 100644 --- a/specials/globalsearch.py +++ b/specials/globalsearch.py @@ -462,6 +462,8 @@ class SearchWindow(xbmcgui.WindowXML): if self.item.type: self.item.mode = self.item.type self.item.text = title_unify(self.item.text) + if self.item.contentType == 'movie' and self.item.infoLabels['year']: + self.item.text += " " + str(self.item.infoLabels['year']) self.thread = Thread(target=self.search) self.thread.start() elif self.item.mode in ['movie', 'tvshow', 'person_']: