check for 'a' in anidb ids

This commit is contained in:
meisnate12 2021-12-02 01:39:46 -05:00
parent 7424cae266
commit 987fa2b3f0
2 changed files with 4 additions and 1 deletions

View file

@ -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")

View file

@ -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)