[6] fix No Anime Found errors

pull/1168/head
meisnate12 2 years ago
parent 6cafca3020
commit f2d6020c64

@ -1 +1 @@
1.18.0-develop5 1.18.0-develop6

@ -173,17 +173,19 @@ class Operations:
anidb_id = self.config.Convert._imdb_to_anidb[imdb_id] anidb_id = self.config.Convert._imdb_to_anidb[imdb_id]
else: else:
anidb_id = None anidb_id = None
logger.info(f"No AniDB ID for Guid: {item.guid}") if any([o.startswith("anidb") for o in self.library.meta_operations]):
if anidb_id: if anidb_id:
try: try:
anidb_item = self.config.AniDB.get_anime(anidb_id) anidb_item = self.config.AniDB.get_anime(anidb_id)
except Failed as e: except Failed as e:
logger.error(str(e)) logger.error(str(e))
else:
logger.warning(f"No AniDB ID for Guid: {item.guid}")
if any([o.startswith("mal") for o in self.library.meta_operations]): if any([o.startswith("mal") for o in self.library.meta_operations]):
if item.ratingKey in reverse_mal: if item.ratingKey in reverse_mal:
mal_id = reverse_mal[item.ratingKey] mal_id = reverse_mal[item.ratingKey]
elif not anidb_id or anidb_id not in self.config.Convert._anidb_to_mal: elif not anidb_id or anidb_id not in self.config.Convert._anidb_to_mal:
logger.info(f"No AniDB ID to Convert to MyAnimeList ID for Guid: {item.guid}") logger.warning(f"No AniDB ID to Convert to MyAnimeList ID for Guid: {item.guid}")
mal_id = None mal_id = None
else: else:
mal_id = self.config.Convert._anidb_to_mal[anidb_id] mal_id = self.config.Convert._anidb_to_mal[anidb_id]

Loading…
Cancel
Save