From a4d4a09a7394138409f98a2cd5a64e847be61658 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Sun, 28 Nov 2021 03:18:12 -0500 Subject: [PATCH] #461 Fix for IMDb IDs --- modules/convert.py | 2 +- modules/util.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/convert.py b/modules/convert.py index 5a417a5b..de8b53f6 100644 --- a/modules/convert.py +++ b/modules/convert.py @@ -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)) diff --git a/modules/util.py b/modules/util.py index 56b2021b..fe2ee0c8 100644 --- a/modules/util.py +++ b/modules/util.py @@ -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):