From 923c0f03704ed3d5caea089245a9c6ff74071bb0 Mon Sep 17 00:00:00 2001 From: Umar Javed Date: Sun, 14 Nov 2021 17:30:04 +0500 Subject: 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. --- player/lua/ytdl_hook.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'player/lua') diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua index 27d39afb75..fe055b4d1c 100644 --- a/player/lua/ytdl_hook.lua +++ b/player/lua/ytdl_hook.lua @@ -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 -- cgit v1.2.3