Aggiustamenti a TVDB e TMDB

This commit is contained in:
Alhaziel01
2020-11-07 13:01:28 +01:00
parent f35db58f70
commit 47d2144b0a
5 changed files with 22 additions and 17 deletions
+2 -1
View File
@@ -57,8 +57,9 @@ def find_and_set_infoLabels(item):
while scraper or not item.exit:
# We call the find_and_set_infoLabels function of the selected scraper
scraper_result = scraper.find_and_set_infoLabels(item)
if item.exit: return False
# Check if there is a 'code'
if scraper_result and item.infoLabels['code']:
elif scraper_result and item.infoLabels['code']:
# correct code
logger.info("Identifier found: %s " % item.infoLabels['code'])
scraper.completar_codigos(item)
+1 -2
View File
@@ -524,13 +524,12 @@ def find_and_set_infoLabels(item):
otmdb_global = Tmdb(id_Tmdb=item.infoLabels['tmdb_id'], tipo=tipo_busqueda, idioma_busqueda=def_lang)
results = otmdb_global.get_list_resultados()
if len(results) > 1:
from platformcode import platformtools
tmdb_result = platformtools.show_video_info(results, item=item, caption= tipo_contenido % title)
if not tmdb_result:
res = platformtools.dialog_info(item, 'tmdb')
if res: return find_and_set_infoLabels(res)
if not res.exit: return find_and_set_infoLabels(res)
elif len(results) > 0:
tmdb_result = results[0]
+1 -1
View File
@@ -116,7 +116,7 @@ def find_and_set_infoLabels(item):
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 res: return find_and_set_infoLabels(res)
if not res.exit: return find_and_set_infoLabels(res)
elif len(results) > 0:
tvdb_result = results[0]
+4 -1
View File
@@ -13,6 +13,7 @@ else:
BACKGROUND = 30000
LOADING = 30001
SELECT = 30002
CLOSE = 30003
EXIT = 10
BACKSPACE = 92
@@ -64,7 +65,9 @@ class InfoWindow(xbmcgui.WindowXMLDialog):
def onClick(self, control_id):
if control_id == SELECT:
self.response = self.results[self.getControl(SELECT).getSelectedPosition()]
self.close()
self.close()
elif control_id == CLOSE:
self.close()
def onAction(self, action):
if self.getFocusId() in [SELECT]:
+14 -12
View File
@@ -6,18 +6,6 @@
<top>0</top>
</coordinates>
<controls>
<!-- CLOSE BUTTON / BACKGROUND -->
<control type="button">
<left>0</left>
<top>0</top>
<width>100%</width>
<height>100%</height>
<texturefocus colordiffuse="FF232323">white.png</texturefocus>
<texturenofocus colordiffuse="FF232323">white.png</texturenofocus>
<animation effect="fade" time="200">WindowOpen</animation>
<animation effect="fade" time="200">WindowClose</animation>
<onclick>Action(close)</onclick>
</control>
<!-- GROUP CONTROLS -->
<control type="group">
<left>0</left>
@@ -48,6 +36,19 @@
<animation effect="zoom" pulse ="true" center="auto" start="0,100" end="100,100" time="1000" condition="Control.IsVisible(30001)">Conditional</animation>
</control>
<control type="button" id="30003">
<top>40</top>
<right>40</right>
<height>50</height>
<width>50</width>
<textcolor>FFFFFFFF</textcolor>
<aligny>center</aligny>
<align>center</align>
<texturefocus colordiffuse="FFFFFFFF">close.png</texturefocus>
<texturenofocus colordiffuse="80FFFFFF">close.png</texturenofocus>
<ondown>30002</ondown>
</control>
<!-- SELECTION -->
<control type="fixedlist" id="30002">
<top>40</top>
@@ -56,6 +57,7 @@
<viewtype>wrap</viewtype>
<orientation>horizontal</orientation>
<scrolltime tween="cubic" easing="out">300</scrolltime>
<onup>30003</onup>
<itemlayout width="180">
<!-- Poster -->
<control type="image">