From a2fee0e1e416bb45574cac9841f96c2e2cfe0303 Mon Sep 17 00:00:00 2001 From: Anderson Shindy Oki Date: Mon, 22 Apr 2024 11:11:32 +0900 Subject: [PATCH] Fixed Anidb refinement for not anime episodes. #2463 --- bazarr/subtitles/refiners/anidb.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bazarr/subtitles/refiners/anidb.py b/bazarr/subtitles/refiners/anidb.py index 2174e0f7c..15bc46c95 100644 --- a/bazarr/subtitles/refiners/anidb.py +++ b/bazarr/subtitles/refiners/anidb.py @@ -115,16 +115,16 @@ class AniDBClient(object): def refine_from_anidb(path, video): + if not isinstance(video, Episode) or not video.series_tvdb_id: + logging.debug(f'Video is not an Anime TV series, skipping refinement for {video}') + + return + if refined_providers.intersection(settings.general.enabled_providers) and video.series_anidb_id is None: refine_anidb_ids(video) def refine_anidb_ids(video): - if not isinstance(video, Episode) and not video.series_tvdb_id: - logging.debug(f'Video is not an Anime TV series, skipping refinement for {video}') - - return video - anidb_client = AniDBClient(settings.anidb.api_client, settings.anidb.api_client_ver) season = video.season if video.season else 0