ricerca: prova anno nel titolo con i film + nuovo metodo per ricerca su toonitalia (attesa di nuova regex)
This commit is contained in:
+3
-14
@@ -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'
|
||||
|
||||
@@ -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_']:
|
||||
|
||||
Reference in New Issue
Block a user