mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 21:54:17 +01:00
parent
be4d2ec296
commit
88432ed5ea
@ -152,7 +152,7 @@ class streamSubtile(unittest.TestCase):
|
|||||||
subtitle(setup_defaults(), "wrst", "http://example.com", "sv"),
|
subtitle(setup_defaults(), "wrst", "http://example.com", "sv"),
|
||||||
]
|
]
|
||||||
subs = subtitle_filter(test_subs)
|
subs = subtitle_filter(test_subs)
|
||||||
assert len(subs) == 1
|
assert len(subs) == 3
|
||||||
|
|
||||||
def test_subtitleFilter2(self):
|
def test_subtitleFilter2(self):
|
||||||
config = setup_defaults()
|
config = setup_defaults()
|
||||||
|
@ -85,7 +85,10 @@ def subtitle_filter(subtitles) -> List:
|
|||||||
subs.append(sub)
|
subs.append(sub)
|
||||||
languages.append(sub.subfix)
|
languages.append(sub.subfix)
|
||||||
else:
|
else:
|
||||||
if sub.subfix == preferred:
|
if preferred is None:
|
||||||
|
subs.append(sub)
|
||||||
|
languages.append(sub.subfix)
|
||||||
|
if preferred and sub.subfix == preferred:
|
||||||
subs.append(sub)
|
subs.append(sub)
|
||||||
languages.append(sub.subfix)
|
languages.append(sub.subfix)
|
||||||
return subs
|
return subs
|
||||||
|
Loading…
Reference in New Issue
Block a user