aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorVitiko <[email protected]>2024-07-09 18:51:51 -0400
committerVitiko <[email protected]>2024-07-09 18:51:51 -0400
commitaafaf1cbf1ac29249960f2d5f2c7ba0608a5c284 (patch)
treea0631b9ec54a7e187f5528f23e6045e947e1dc82 /tests
parent12e7bbfb01e846f95074705a111823eab72f5a7d (diff)
downloadbazarr-aafaf1cbf1ac29249960f2d5f2c7ba0608a5c284.tar.gz
bazarr-aafaf1cbf1ac29249960f2d5f2c7ba0608a5c284.zip
Update fese (extractor) (cover #2538)
Diffstat (limited to 'tests')
-rw-r--r--tests/subliminal_patch/test_embeddedsubtitles.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/subliminal_patch/test_embeddedsubtitles.py b/tests/subliminal_patch/test_embeddedsubtitles.py
index b7bfaa0a8..7326a368b 100644
--- a/tests/subliminal_patch/test_embeddedsubtitles.py
+++ b/tests/subliminal_patch/test_embeddedsubtitles.py
@@ -107,6 +107,13 @@ def fake_streams():
"tags": {"language": "eng", "title": "English"},
}
),
+ "tg": FFprobeSubtitleStream(
+ {
+ "index": 3,
+ "codec_name": "subrip",
+ "tags": {"language": "fil", "title": "Filipino"},
+ }
+ ),
"es_hi": FFprobeSubtitleStream(
{
"index": 3,
@@ -192,6 +199,18 @@ def test_list_subtitles_hi_fallback_one_stream(
assert subs[0].hearing_impaired == False
+def test_list_subtitles_custom_language_from_fese(
+ video_single_language, fake_streams, mocker
+):
+ with EmbeddedSubtitlesProvider(hi_fallback=True) as provider:
+ language = Language("tgl", "PH")
+ mocker.patch(
+ "subliminal_patch.providers.embeddedsubtitles._MemoizedFFprobeVideoContainer.get_subtitles",
+ return_value=[fake_streams["tg"]],
+ )
+ assert provider.list_subtitles(video_single_language, {language})
+
+
def test_list_subtitles_hi_fallback_multiple_streams(
video_single_language, fake_streams, mocker
):