From 987fa2b3f0a08633b81ee266737707f9df29b840 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Thu, 2 Dec 2021 01:39:46 -0500 Subject: [PATCH] check for 'a' in anidb ids --- modules/convert.py | 3 ++- modules/trakt.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/convert.py b/modules/convert.py index 93af8c31..9ba69deb 100644 --- a/modules/convert.py +++ b/modules/convert.py @@ -228,7 +228,8 @@ class Convert: if check_id.startswith("tvdb"): tvdb_id.append(int(re.search("-(.*)", check_id).group(1))) elif check_id.startswith("anidb"): - anidb_id = int(re.search("-(.*)", check_id).group(1)) + anidb_str = str(re.search("-(.*)", check_id).group(1)) + anidb_id = int(anidb_str[1:] if anidb_str[0] == "a" else anidb_str) library.anidb_map[anidb_id] = item.ratingKey else: raise Failed(f"Hama Agent ID: {check_id} not supported") diff --git a/modules/trakt.py b/modules/trakt.py index a0b517d1..d268ec11 100644 --- a/modules/trakt.py +++ b/modules/trakt.py @@ -202,6 +202,8 @@ class Trakt: values = util.get_list(trakt_lists, split=False) trakt_values = [] for value in values: + if isinstance(value, dict): + raise Failed("Trakt Error: List cannot be a dictionary") try: if trakt_type == "list": self._user_list(value)