summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorVitiko <[email protected]>2023-04-14 23:19:12 -0400
committerVitiko <[email protected]>2023-04-14 23:19:12 -0400
commitda542a311a5f9a72f36cf25802b38e75e518d7db (patch)
tree4b720abc0f4c3f7f025fb08c2aa878151a82b7ea /tests
parent695734abe67f56f34a5e99aa98cd558e2b39545b (diff)
downloadbazarr-da542a311a5f9a72f36cf25802b38e75e518d7db.tar.gz
bazarr-da542a311a5f9a72f36cf25802b38e75e518d7db.zip
Subdivx Provider: handle UnicodeEncodeError for some titlesv1.2.1-beta.15
Diffstat (limited to 'tests')
-rw-r--r--tests/subliminal_patch/test_subdivx.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/subliminal_patch/test_subdivx.py b/tests/subliminal_patch/test_subdivx.py
index 15b4fce53..96342075c 100644
--- a/tests/subliminal_patch/test_subdivx.py
+++ b/tests/subliminal_patch/test_subdivx.py
@@ -153,3 +153,21 @@ def test_subtitle_matches(video):
assert "resolution" in matches
assert "video_codec" in matches
assert "release_group" in matches
+
+
+def test_latin_1_subtitles():
+ item = Episode.fromname(
+ "/tv/Grey's Anatomy/Season 19/Greys.Anatomy.S19E13.1080p.WEB.h264-ELEANOR[rarbg].mkv"
+ )
+
+ item.series = "Grey's Anatomy"
+ item.season = 19
+ item.episode = 13
+
+ with SubdivxSubtitlesProvider() as provider:
+ subtitles = provider.list_subtitles(item, {Language.fromietf("es")})
+ subtitle = subtitles[0]
+
+ provider.download_subtitle(subtitle)
+
+ assert subtitle.is_valid()