summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorVitiko <[email protected]>2023-06-18 17:18:49 -0400
committerVitiko <[email protected]>2023-06-18 17:18:49 -0400
commit4921c55bf05189f68bdd6279b957eaffd00e7cf0 (patch)
treecc44ae944534c1c8c0600c26be487b95de72d9fe /tests
parent374e4bec87c4581c4bb07e7fe528123ffa6998d4 (diff)
downloadbazarr-4921c55bf05189f68bdd6279b957eaffd00e7cf0.tar.gz
bazarr-4921c55bf05189f68bdd6279b957eaffd00e7cf0.zip
Subf2m provider: improve episode matchingv1.2.2-beta.21
Diffstat (limited to 'tests')
-rw-r--r--tests/subliminal_patch/test_subf2m.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/subliminal_patch/test_subf2m.py b/tests/subliminal_patch/test_subf2m.py
index 2df17af2d..e8369d2fa 100644
--- a/tests/subliminal_patch/test_subf2m.py
+++ b/tests/subliminal_patch/test_subf2m.py
@@ -1,4 +1,5 @@
import pytest
+from subliminal_patch.core import Episode
from subliminal_patch.providers import subf2m
from subliminal_patch.providers.subf2m import ConfigurationError
from subliminal_patch.providers.subf2m import Subf2mProvider
@@ -208,3 +209,27 @@ def test_get_episode_from_release_return_none():
def test_get_episode_from_release_w_empty_match_return_none():
assert subf2m._get_episode_from_release("Vinland Saga - 02") is None
+
+
+def test_complex_episode_name(provider):
+ episode = Episode(
+ **{
+ "name": "Dr.Romantic.S03E16.SBS.x265.1080p-thon.mkv",
+ "source": "HDTV",
+ "release_group": "thon",
+ "resolution": "1080p",
+ "video_codec": "H.265",
+ "audio_codec": "AAC",
+ "subtitle_languages": set(),
+ "original_name": "Dr. Romantic - S03E16.mkv",
+ "other": None,
+ "series": "Dr. Romantic",
+ "season": 3,
+ "episode": 16,
+ "title": "Dreamers",
+ "year": 2016,
+ "series_imdb_id": "tt6157190",
+ "alternative_series": ["Romantic Doctor Teacher Kim"],
+ }
+ )
+ assert provider.list_subtitles(episode, {Language.fromietf("en")})