Fix in caso di mancata corrispondenza del titolo
This commit is contained in:
@@ -54,20 +54,22 @@ def find_and_set_infoLabels(item):
|
||||
import traceback
|
||||
logger.error(traceback.format_exc())
|
||||
|
||||
# while scraper:
|
||||
# We call the find_and_set_infoLabels function of the selected scraper
|
||||
scraper_result = scraper.find_and_set_infoLabels(item)
|
||||
# from core.support import dbg; dbg()
|
||||
# Check if there is a 'code'
|
||||
if scraper_result and item.infoLabels['code']:
|
||||
# correct code
|
||||
logger.info("Identifier found: %s " % item.infoLabels['code'])
|
||||
scraper.completar_codigos(item)
|
||||
return True
|
||||
else:
|
||||
# Content not found
|
||||
logger.info(logger.info("Identifier not found for: %s " % title))
|
||||
return
|
||||
while scraper or not item.exit:
|
||||
from core.support import dbg;dbg()
|
||||
# We call the find_and_set_infoLabels function of the selected scraper
|
||||
scraper_result = scraper.find_and_set_infoLabels(item)
|
||||
# from core.support import dbg; dbg()
|
||||
# Check if there is a 'code'
|
||||
if scraper_result and item.infoLabels['code']:
|
||||
# correct code
|
||||
logger.info("Identifier found: %s " % item.infoLabels['code'])
|
||||
scraper.completar_codigos(item)
|
||||
return True
|
||||
else:
|
||||
# Content not found
|
||||
logger.info(logger.info("Identifier not found for: %s " % title))
|
||||
item = platformtools.dialog_info(item, scraper_actual)
|
||||
if item.exit: return False
|
||||
|
||||
|
||||
def cuadro_completar(item):
|
||||
|
||||
@@ -139,10 +139,13 @@ class autorenumber():
|
||||
# Pulizia del Titolo
|
||||
if any( word in self.title.lower() for word in ['specials', 'speciali']):
|
||||
self.title = re.sub(r'\s*specials|\s*speciali', '', self.title.lower())
|
||||
tvdb.find_and_set_infoLabels(self.item)
|
||||
elif not self.item.infoLabels['tvdb_id']:
|
||||
self.item.contentSerieName = self.title.rstrip('123456789 ')
|
||||
|
||||
while not self.item.exit:
|
||||
self.item = platformtools.dialog_info(self.item, 'tvdb') # <- Enter title to search
|
||||
tvdb.find_and_set_infoLabels(self.item)
|
||||
if self.item.infoLabels['tvdb_id']: self.item.exit = True
|
||||
|
||||
# Rinumerazione Automatica
|
||||
if (not self.id and self.auto) or self.item.renumber:
|
||||
|
||||
@@ -1432,7 +1432,8 @@ class TitleOrIDWindow(xbmcgui.WindowXMLDialog):
|
||||
def onClick(self, control):
|
||||
if control in [10003]:
|
||||
if self.getControl(10001).getText():
|
||||
self.item.contentTitle = self.getControl(10001).getText()
|
||||
if self.scraper == 'tmdb': self.item.contentTitle = self.getControl(10001).getText()
|
||||
else: self.item.contentSerieName = self.getControl(10001).getText()
|
||||
if self.scraper == 'tmdb' and self.getControl(10002).getText():
|
||||
self.item.infoLabels['tmdb_id'] = self.getControl(10002).getText()
|
||||
elif self.scraper == 'tvdb' and self.getControl(10002).getText():
|
||||
@@ -1440,10 +1441,10 @@ class TitleOrIDWindow(xbmcgui.WindowXMLDialog):
|
||||
self.close()
|
||||
|
||||
elif control in [10004, 10005]:
|
||||
self.item = None
|
||||
self.item.exit = True
|
||||
self.close()
|
||||
|
||||
def onAction(self, action):
|
||||
if (action in [92] and self.getFocusId() not in [10001, 10002]) or action in [10]:
|
||||
self.item = None
|
||||
self.item.exit = True
|
||||
self.close()
|
||||
|
||||
Reference in New Issue
Block a user