summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAnderson Shindy Oki <[email protected]>2024-10-26 17:52:56 +0900
committerGitHub <[email protected]>2024-10-26 17:52:56 +0900
commit23c19db2e2f43c86bea98df80afe5b4b190a82b3 (patch)
tree046273d48935bd42bf1c6c6a3ef11dcd498c4f77
parent239ab780eb5c3006ce28a45eb5bf2c7eb65d56ad (diff)
downloadbazarr-23c19db2e2f43c86bea98df80afe5b4b190a82b3.tar.gz
bazarr-23c19db2e2f43c86bea98df80afe5b4b190a82b3.zip
Fixed anidb refiner special episodes without offset (#2736)v1.4.6-beta.13
-rw-r--r--bazarr/subtitles/refiners/anidb.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bazarr/subtitles/refiners/anidb.py b/bazarr/subtitles/refiners/anidb.py
index c066cd598..ba8d6bcf0 100644
--- a/bazarr/subtitles/refiners/anidb.py
+++ b/bazarr/subtitles/refiners/anidb.py
@@ -91,11 +91,11 @@ class AniDBClient(object):
return None, None, None
is_special_entry = True
+
for special_entry in special_entries:
mapping_list = special_entry.findall(f".//mapping[@tvdbseason='{tvdb_series_season}']")
- if len(mapping_list) > 0:
- anidb_id = int(special_entry.attrib.get('anidbid'))
- offset = int(mapping_list[0].attrib.get('offset', 0))
+ anidb_id = int(special_entry.attrib.get('anidbid'))
+ offset = int(mapping_list[0].attrib.get('offset', 0)) if len(mapping_list) > 0 else 0
if not is_special_entry:
# Sort the anime by offset in ascending order