From 2467bc0bc04fd5b8e39f015bd72cccdd6d1b284b Mon Sep 17 00:00:00 2001 From: morpheus65535 Date: Sun, 1 Oct 2023 14:06:16 -0400 Subject: [PATCH] no log: fixed stuff to prevent exception --- bazarr/subtitles/processing.py | 4 ++-- 1 file 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 []