|
|
|
@ -69,10 +69,10 @@ class Convert:
|
|
|
|
|
def ids_to_anidb(self, library, rating_key, tvdb_id, imdb_id, tmdb_id):
|
|
|
|
|
if rating_key in library.reverse_anidb:
|
|
|
|
|
return library.reverse_anidb[rating_key]
|
|
|
|
|
elif int(tvdb_id) in self._tvdb_to_anidb:
|
|
|
|
|
elif tvdb_id and int(tvdb_id) in self._tvdb_to_anidb:
|
|
|
|
|
return self._tvdb_to_anidb[int(tvdb_id)]
|
|
|
|
|
else:
|
|
|
|
|
tmdb_show_id = self.tvdb_to_tmdb(tvdb_id)
|
|
|
|
|
tmdb_show_id = self.tvdb_to_tmdb(tvdb_id) if tvdb_id else None
|
|
|
|
|
if tmdb_show_id and tmdb_show_id in self._tmdb_show_to_anidb:
|
|
|
|
|
return self._tmdb_show_to_anidb[tmdb_show_id]
|
|
|
|
|
elif imdb_id in self._imdb_to_anidb:
|
|
|
|
@ -109,7 +109,6 @@ class Convert:
|
|
|
|
|
added = True
|
|
|
|
|
if added is False and anidb_id in self._anidb_to_tvdb:
|
|
|
|
|
ids.append((self._anidb_to_tvdb[anidb_id], "tvdb"))
|
|
|
|
|
ids.append((self._anidb_to_tmdb_movie[anidb_id], "tmdb"))
|
|
|
|
|
elif anidb_id in self._anidb_to_tvdb:
|
|
|
|
|
ids.append((self._anidb_to_tvdb[anidb_id], "tvdb"))
|
|
|
|
|
elif anidb_id in self._anidb_to_tmdb_show:
|
|
|
|
@ -118,7 +117,6 @@ class Convert:
|
|
|
|
|
ids.append((int(self.tmdb_to_tvdb(tmdb_id, fail=True)), "tvdb"))
|
|
|
|
|
except Failed:
|
|
|
|
|
pass
|
|
|
|
|
ids.append((self._anidb_to_tmdb_show[anidb_id], "tmdb"))
|
|
|
|
|
elif str(anidb_id) in self._anidb_ids:
|
|
|
|
|
logger.warning(f"Convert Warning: No TVDb ID or IMDb ID found for AniDB ID: {anidb_id}")
|
|
|
|
|
else:
|
|
|
|
|