Fix TMDB
This commit is contained in:
+4
-4
@@ -18,7 +18,7 @@ from future.builtins import object
|
|||||||
|
|
||||||
import ast, copy, re, time
|
import ast, copy, re, time
|
||||||
|
|
||||||
from core import filetools, httptools, jsontools, scrapertools, support
|
from core import filetools, httptools, jsontools, scrapertools
|
||||||
from core.item import InfoLabels
|
from core.item import InfoLabels
|
||||||
from platformcode import config, logger, platformtools
|
from platformcode import config, logger, platformtools
|
||||||
|
|
||||||
@@ -997,8 +997,9 @@ class Tmdb(object):
|
|||||||
total_pages = resultado.get("total_pages", 0)
|
total_pages = resultado.get("total_pages", 0)
|
||||||
|
|
||||||
if total_results > 0:
|
if total_results > 0:
|
||||||
results = [r for r in resultado["results"] if r['first_air_date']]
|
results = [r for r in resultado["results"] if r.get('first_air_date', r.get('release_date', ''))]
|
||||||
# results = resultado["results"]
|
# results = resultado["results"]
|
||||||
|
# logger.debug('RISULTATI', results)
|
||||||
|
|
||||||
if self.busqueda_filtro and total_results > 1:
|
if self.busqueda_filtro and total_results > 1:
|
||||||
for key, value in list(dict(self.busqueda_filtro).items()):
|
for key, value in list(dict(self.busqueda_filtro).items()):
|
||||||
@@ -1127,7 +1128,7 @@ class Tmdb(object):
|
|||||||
num_result = min([num_result, self.total_results])
|
num_result = min([num_result, self.total_results])
|
||||||
|
|
||||||
cr = 0
|
cr = 0
|
||||||
# support.dbg()
|
|
||||||
for p in range(1, self.total_pages + 1):
|
for p in range(1, self.total_pages + 1):
|
||||||
for r in range(0, len(self.results)):
|
for r in range(0, len(self.results)):
|
||||||
try:
|
try:
|
||||||
@@ -1388,7 +1389,6 @@ class Tmdb(object):
|
|||||||
logger.debug("The episode or season number is not valid")
|
logger.debug("The episode or season number is not valid")
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
# from core.support import dbg;dbg()
|
|
||||||
temporada = self.get_temporada(numtemporada)
|
temporada = self.get_temporada(numtemporada)
|
||||||
if not isinstance(temporada, dict):
|
if not isinstance(temporada, dict):
|
||||||
temporada = ast.literal_eval(temporada.decode('utf-8'))
|
temporada = ast.literal_eval(temporada.decode('utf-8'))
|
||||||
|
|||||||
Reference in New Issue
Block a user