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:
Andy
2025-10-15 22:39:44 +00:00
parent 45902bba13
commit a7bde29401

View File

@@ -820,7 +820,7 @@ class dl:
sys.exit(1)
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
# might have no audio tracks if part of the video, e.g. transport stream hls