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