mirror of
https://github.com/mpv-player/mpv
synced 2025-02-15 03:27:35 +00:00
ytdl_hook.lua: improve check for sub language before inserting all-subs
youtube-dl and yt-dlp both support --sub-langs and --srt-lang in addition to --sub-lang for defining languages of subtitles. This hook only checked for sub-lang in --ytdl-raw-options and inserted --all-subs in its absence.
This commit is contained in:
parent
b44f522dba
commit
923c0f0370
@ -762,7 +762,7 @@ function run_ytdl_hook(url)
|
||||
if (arg ~= "") then
|
||||
table.insert(command, arg)
|
||||
end
|
||||
if (param == "sub-lang") and (arg ~= "") then
|
||||
if (param == "sub-lang" or param == "sub-langs" or param == "srt-lang") and (arg ~= "") then
|
||||
allsubs = false
|
||||
elseif (param == "proxy") and (arg ~= "") then
|
||||
proxy = arg
|
||||
|
Loading…
Reference in New Issue
Block a user