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