diff options
-rw-r--r-- | libs/subliminal_patch/providers/embeddedsubtitles.py | 3 | ||||
-rw-r--r-- | tests/subliminal_patch/test_embeddedsubtitles.py | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/libs/subliminal_patch/providers/embeddedsubtitles.py b/libs/subliminal_patch/providers/embeddedsubtitles.py index 3d9e64959..aa8927fd6 100644 --- a/libs/subliminal_patch/providers/embeddedsubtitles.py +++ b/libs/subliminal_patch/providers/embeddedsubtitles.py @@ -30,6 +30,9 @@ class EmbeddedSubtitle(Subtitle): def __init__(self, stream, container, matches): super().__init__(stream.language, stream.disposition.hearing_impaired) + if stream.disposition.forced: + self.language = Language.rebuild(stream.language, forced=True) + self.stream: FFprobeSubtitleStream = stream self.container: FFprobeVideoContainer = container self.forced = stream.disposition.forced diff --git a/tests/subliminal_patch/test_embeddedsubtitles.py b/tests/subliminal_patch/test_embeddedsubtitles.py index ee1c8d6eb..6c546a61f 100644 --- a/tests/subliminal_patch/test_embeddedsubtitles.py +++ b/tests/subliminal_patch/test_embeddedsubtitles.py @@ -82,6 +82,7 @@ def test_list_subtitles_also_forced(video_single_language): language_2 = Language.rebuild(language_1, forced=True) subs = provider.list_subtitles(video_single_language, {language_1, language_2}) assert any(language_1 == sub.language for sub in subs) + assert any(not sub.language.forced for sub in subs) def test_list_subtitles_single_language(video_single_language): |