From a935109235b1032fe15a6ce790fafbcd401ecf6e Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 24 Oct 2019 12:57:46 +0200 Subject: 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 --- player/lua/ytdl_hook.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua index 86f3fe8f77..7e77eb01ba 100644 --- a/player/lua/ytdl_hook.lua +++ b/player/lua/ytdl_hook.lua @@ -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 -- cgit v1.2.3