ytdl_hook: --vid=no should not ignore --ytdl-format in config file

Do this only if ytdl-format was not set at all.

Fixes: #6636
This commit is contained in:
wm4 2019-10-24 12:57:46 +02:00
parent 14eefb7c0a
commit a935109235
1 changed files with 1 additions and 3 deletions

View File

@ -501,9 +501,7 @@ function run_ytdl_hook(url)
-- Checks if video option is "no", change format accordingly,
-- but only if user didn't explicitly set one
if (mp.get_property("options/vid") == "no")
and not option_was_set("ytdl-format") then
if (mp.get_property("options/vid") == "no") and (#format == 0) then
format = "bestaudio/best"
msg.verbose("Video disabled. Only using audio")
end