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