check for 'a' in anidb ids

pull/476/head
meisnate12 3 years ago
parent 7424cae266
commit 987fa2b3f0

@ -228,7 +228,8 @@ class Convert:
if check_id.startswith("tvdb"): if check_id.startswith("tvdb"):
tvdb_id.append(int(re.search("-(.*)", check_id).group(1))) tvdb_id.append(int(re.search("-(.*)", check_id).group(1)))
elif check_id.startswith("anidb"): 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 library.anidb_map[anidb_id] = item.ratingKey
else: else:
raise Failed(f"Hama Agent ID: {check_id} not supported") raise Failed(f"Hama Agent ID: {check_id} not supported")

@ -202,6 +202,8 @@ class Trakt:
values = util.get_list(trakt_lists, split=False) values = util.get_list(trakt_lists, split=False)
trakt_values = [] trakt_values = []
for value in values: for value in values:
if isinstance(value, dict):
raise Failed("Trakt Error: List cannot be a dictionary")
try: try:
if trakt_type == "list": if trakt_type == "list":
self._user_list(value) self._user_list(value)

Loading…
Cancel
Save