summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-10-24 12:57:46 +0200
committerwm4 <wm4@nowhere>2019-10-24 13:52:09 +0200
commita935109235b1032fe15a6ce790fafbcd401ecf6e (patch)
tree72dc3e079ab8f0fbd89c364121ad52efee2dd21d
parent14eefb7c0ab6cbceeceb503ca2de4fc487c17fca (diff)
downloadmpv-a935109235b1032fe15a6ce790fafbcd401ecf6e.tar.bz2
mpv-a935109235b1032fe15a6ce790fafbcd401ecf6e.tar.xz
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
-rw-r--r--player/lua/ytdl_hook.lua4
1 files changed, 1 insertions, 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