Fix Autorenumber e scrapers
This commit is contained in:
@@ -21,6 +21,7 @@ def find_and_set_infoLabels(item):
|
||||
:param item:
|
||||
:return: Boolean indicating if the 'code' could be found
|
||||
"""
|
||||
# from core.support import dbg;dbg()
|
||||
global scraper
|
||||
scraper = None
|
||||
# logger.debug("item:\n" + item.tostring('\n'))
|
||||
@@ -32,7 +33,7 @@ def find_and_set_infoLabels(item):
|
||||
# Get the default Scraper of the configuration according to the content type
|
||||
if item.contentType == "movie":
|
||||
scraper_actual = ['tmdb'][config.get_setting("scraper_movies", "videolibrary")]
|
||||
tipo_contenido = config.get_localized_string(70283)
|
||||
tipo_contenido = "movie"
|
||||
title = item.contentTitle
|
||||
# Complete list of options for this type of content
|
||||
list_opciones_cuadro.append(scrapers_disponibles['tmdb'])
|
||||
|
||||
@@ -526,14 +526,8 @@ def find_and_set_infoLabels(item):
|
||||
results = otmdb_global.get_list_resultados()
|
||||
if len(results) > 1:
|
||||
tmdb_result = platformtools.show_video_info(results, item=item, caption= tipo_contenido % title)
|
||||
if not tmdb_result:
|
||||
res = platformtools.dialog_info(item, 'tmdb')
|
||||
if not res.exit: return find_and_set_infoLabels(res)
|
||||
elif len(results) > 0:
|
||||
tmdb_result = results[0]
|
||||
else:
|
||||
res = platformtools.dialog_info(item, 'tmdb')
|
||||
if not res.exit: return find_and_set_infoLabels(res)
|
||||
|
||||
if isinstance(item.infoLabels, InfoLabels):
|
||||
infoLabels = item.infoLabels
|
||||
|
||||
12
core/tvdb.py
12
core/tvdb.py
@@ -117,15 +117,15 @@ def find_and_set_infoLabels(item):
|
||||
|
||||
if len(results) > 1:
|
||||
tvdb_result = platformtools.show_video_info(results, item=item, scraper=Tvdb, caption=config.get_localized_string(60298) % title)
|
||||
if not tvdb_result:
|
||||
res = platformtools.dialog_info(item, 'tvdb')
|
||||
if not res.exit: return find_and_set_infoLabels(res)
|
||||
# if not tvdb_result:
|
||||
# res = platformtools.dialog_info(item, 'tvdb')
|
||||
# if not res.exit: return find_and_set_infoLabels(res)
|
||||
elif len(results) > 0:
|
||||
tvdb_result = results[0]
|
||||
|
||||
else:
|
||||
res = platformtools.dialog_info(item, 'tvdb')
|
||||
if not res.exit: return find_and_set_infoLabels(res)
|
||||
# else:
|
||||
# res = platformtools.dialog_info(item, 'tvdb')
|
||||
# if not res.exit: return find_and_set_infoLabels(res)
|
||||
|
||||
# todo revisar
|
||||
if isinstance(item.infoLabels, InfoLabels):
|
||||
|
||||
@@ -1073,6 +1073,7 @@ def add_tvshow(item, channel=None):
|
||||
# If the second screen is canceled, the variable "scraper_return" will be False. The user does not want to continue
|
||||
|
||||
item = generictools.update_title(item) # We call the method that updates the title with tmdb.find_and_set_infoLabels
|
||||
if not item: return
|
||||
#if item.tmdb_stat:
|
||||
# del item.tmdb_stat # We clean the status so that it is not recorded in the Video Library
|
||||
|
||||
@@ -1089,6 +1090,7 @@ def add_tvshow(item, channel=None):
|
||||
item.action = action
|
||||
if not item.exit:
|
||||
return add_tvshow(item, channel)
|
||||
itemlist = getattr(channel, item.action)(item)
|
||||
else:
|
||||
itemlist = getattr(channel, item.action)(item)
|
||||
|
||||
|
||||
@@ -129,7 +129,8 @@ def update_title(item):
|
||||
scraper_return = scraper.find_and_set_infoLabels(item)
|
||||
|
||||
if not scraper_return: # If the user has canceled, we restore the data to the initial situation and leave
|
||||
item = new_item.clone()
|
||||
return
|
||||
# item = new_item.clone()
|
||||
else:
|
||||
# If the user has changed the data in "Complete Information" you must see the final title in TMDB
|
||||
if not item.infoLabels['tmdb_id']:
|
||||
|
||||
@@ -151,6 +151,7 @@ class autorenumber():
|
||||
while not self.item.exit:
|
||||
tvdb.find_and_set_infoLabels(self.item)
|
||||
if self.item.infoLabels['tvdb_id']: self.item.exit = True
|
||||
else: self.item = platformtools.dialog_info(self.item, 'tvdb')
|
||||
|
||||
# Rinumerazione Automatica
|
||||
if (not self.id and self.auto) or self.item.renumber:
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<window>
|
||||
<allowoverlays>false</allowoverlays>
|
||||
<animation type="WindowOpen" reversible="false">
|
||||
<effect type="fade" start="0" end="100" time="300" />
|
||||
<effect type="fade" start="0" end="100" time="200" />
|
||||
</animation>
|
||||
<animation type="WindowClose" reversible="false">
|
||||
<effect type="fade" start="100" end="0" time="300" />
|
||||
<effect type="fade" start="100" end="0" time="200" />
|
||||
</animation>
|
||||
<controls>
|
||||
<!-- MAIN SELECTION -->
|
||||
|
||||
Reference in New Issue
Block a user