#461 Fix for IMDb IDs

This commit is contained in:
meisnate12 2021-11-28 03:18:12 -05:00
parent 7fac92652c
commit a4d4a09a73
2 changed files with 4 additions and 2 deletions

View file

@ -198,7 +198,7 @@ class Convert:
check_id = guid.netloc
if self.config.Cache:
cache_id, imdb_check, media_type, expired = self.config.Cache.query_guid_map(item.guid)
if cache_id and not expired:
if (cache_id or imdb_check) and not expired:
media_id_type = "movie" if "movie" in media_type else "show"
if item_type == "hama" and check_id.startswith("anidb"):
anidb_id = int(re.search("-(.*)", check_id).group(1))

View file

@ -88,7 +88,9 @@ def get_list(data, lower=False, split=True, int_list=False):
elif isinstance(data, dict): return [data]
elif split is False: return [str(data)]
elif lower is True: return [d.strip().lower() for d in str(data).split(",")]
elif int_list is True: return [int(d.strip()) for d in str(data).split(",")]
elif int_list is True:
try: return [int(d.strip()) for d in str(data).split(",")]
except ValueError: return []
else: return [d.strip() for d in str(data).split(",")]
def get_int_list(data, id_type):