From 0e620efcc2f8db4b45e760a7ab517f473f4ce5b7 Mon Sep 17 00:00:00 2001 From: pannal <1359593+pannal@users.noreply.github.com> Date: Thu, 10 Oct 2024 14:08:34 +0200 Subject: [PATCH] Providers/Embedded: Fix bad non-HI detection when forced subtitles available The HI fallback logic's language check ignores the forced flag and doesn't fall back to HI when no subtitle without HI is found, but a forced one is. --- custom_libs/subliminal_patch/providers/embeddedsubtitles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_libs/subliminal_patch/providers/embeddedsubtitles.py b/custom_libs/subliminal_patch/providers/embeddedsubtitles.py index 2d8a492c7..943607735 100644 --- a/custom_libs/subliminal_patch/providers/embeddedsubtitles.py +++ b/custom_libs/subliminal_patch/providers/embeddedsubtitles.py @@ -287,7 +287,7 @@ def _check_hi_fallback(streams, languages): logger.debug("Checking HI fallback for '%r' language", language) streams_ = [ - stream for stream in streams if stream.language.alpha3 == language.alpha3 + stream for stream in streams if stream.language.alpha3 == language.alpha3 and stream.language.forced == language.forced ] if len(streams_) == 1 and streams_[0].disposition.hearing_impaired: stream_ = streams_[0]