summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormorpheus65535 <[email protected]>2023-10-01 14:06:16 -0400
committermorpheus65535 <[email protected]>2023-10-01 14:06:16 -0400
commit2467bc0bc04fd5b8e39f015bd72cccdd6d1b284b (patch)
tree783342515676b7c27cd613c876423b3d99daf68f
parentbad77e2ce7aa61d8202d8b0bd505ab24610f12d5 (diff)
downloadbazarr-2467bc0bc04fd5b8e39f015bd72cccdd6d1b284b.tar.gz
bazarr-2467bc0bc04fd5b8e39f015bd72cccdd6d1b284b.zip
no log: fixed stuff to prevent exception
-rw-r--r--bazarr/subtitles/processing.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bazarr/subtitles/processing.py b/bazarr/subtitles/processing.py
index c5345966e..f085da236 100644
--- a/bazarr/subtitles/processing.py
+++ b/bazarr/subtitles/processing.py
@@ -149,13 +149,13 @@ def process_subtitle(subtitle, media_type, audio_language, path, max_score, is_u
reversed_subtitles_path=reversed_subtitles_path,
hearing_impaired=subtitle.language.hi,
matched=list(subtitle.matches or []),
- not_matched=_get_not_matched(subtitle, media_type)) or [],
+ not_matched=_get_not_matched(subtitle, media_type)),
def _get_not_matched(subtitle, media_type):
_, _, scores = _get_scores(media_type)
- if 'hash' not in subtitle.matches:
+ if subtitle.matches and isinstance(subtitle.matches, set) and 'hash' not in subtitle.matches:
return list(set(scores) - set(subtitle.matches))
else:
return []