mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 21:54:17 +01:00
subtitle_filter: rewrite function to work as intended
This commit is contained in:
parent
fed357e432
commit
d68b3e3d7a
@ -81,10 +81,11 @@ def subtitle_filter(subtitles) -> List:
|
||||
|
||||
for sub in subtitles:
|
||||
if sub.subfix not in languages:
|
||||
if not all_subs and sub.subfix == preferred:
|
||||
if all_subs:
|
||||
subs.append(sub)
|
||||
languages.append(sub.subfix)
|
||||
else:
|
||||
if sub.subfix == preferred:
|
||||
subs.append(sub)
|
||||
languages.append(sub.subfix)
|
||||
return subs
|
||||
|
Loading…
Reference in New Issue
Block a user