mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2025-10-23 15:11:08 +00:00
fix: only exclude forced subs when --forced-subs flag is not set
Previously, forced subtitles were incorrectly included when they matched languages in the lang configuration, even without the --forced-subs flag. This caused forced subs to appear when using language configs or the -l parameter, which violated the expected behavior.
This commit is contained in:
@@ -820,7 +820,7 @@ class dl:
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
if not forced_subs:
|
if not forced_subs:
|
||||||
title.tracks.select_subtitles(lambda x: not x.forced or is_close_match(x.language, lang))
|
title.tracks.select_subtitles(lambda x: not x.forced)
|
||||||
|
|
||||||
# filter audio tracks
|
# filter audio tracks
|
||||||
# might have no audio tracks if part of the video, e.g. transport stream hls
|
# might have no audio tracks if part of the video, e.g. transport stream hls
|
||||||
|
|||||||
Reference in New Issue
Block a user