[5] catch TMDb Not Found

pull/1246/head
meisnate12 2 years ago
parent 2f91582fff
commit bca7074dce

@ -1 +1 @@
1.18.1-develop4
1.18.1-develop5

@ -22,10 +22,13 @@ class Convert:
for anidb_id, ids in self._anidb_ids.items():
anidb_id = int(anidb_id)
if "mal_id" in ids:
self._mal_to_anidb[int(ids["mal_id"])] = anidb_id
self._anidb_to_mal[int(anidb_id)] = int(ids["mal_id"])
for mal_id in util.get_list(ids["mal_id"], int_list=True):
self._mal_to_anidb[mal_id] = anidb_id
if anidb_id not in self._anidb_to_mal:
self._anidb_to_mal[anidb_id] = mal_id
if "anilist_id" in ids:
self._anilist_to_anidb[int(ids["anilist_id"])] = anidb_id
for anilist_id in util.get_list(ids["anilist_id"], int_list=True):
self._anilist_to_anidb[anilist_id] = anidb_id
if "imdb_id" in ids and str(ids["imdb_id"]).startswith("tt"):
self._anidb_to_imdb[anidb_id] = util.get_list(ids["imdb_id"])
for im_id in util.get_list(ids["imdb_id"]):

@ -582,8 +582,13 @@ class Operations:
logger.info(f"{season.title} Background | Reset from {background_location}")
else:
logger.info(f"{season.title} Background | No Reset Image Found")
tmdb_episodes = {e.episode_number: e for e in tmdb_seasons[season.seasonNumber].episodes} if season.seasonNumber in tmdb_seasons else {}
tmdb_episodes = {}
if season.seasonNumber in tmdb_seasons:
for episode in tmdb_seasons[season.seasonNumber].episodes:
try:
tmdb_episodes[episode.episode_number] = episode
except NotFound:
logger.error(f"TMDb Error: An Episode of Season {season.seasonNumber} was Not Found")
for episode in self.library.query(season.episodes):
try:

Loading…
Cancel
Save