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