diff options
author | wm4 <wm4@nowhere> | 2020-02-19 16:31:04 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-02-19 16:31:04 +0100 |
commit | 43c13e5ea23230edca38426d4a9eed049a70890e (patch) | |
tree | 6f0adda8adffd2450b5d8bd223b92c1f9d2e1025 /player | |
parent | b8f80b3854a2f1f4270df5804b0f02eec1ee7514 (diff) | |
download | mpv-43c13e5ea23230edca38426d4a9eed049a70890e.tar.bz2 mpv-43c13e5ea23230edca38426d4a9eed049a70890e.tar.xz |
ytdl_hook: add a way to not pass --format to the command line
Might be helpful for... whatever.
Diffstat (limited to 'player')
-rw-r--r-- | player/lua/ytdl_hook.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua index 8822299671..3526d907ea 100644 --- a/player/lua/ytdl_hook.lua +++ b/player/lua/ytdl_hook.lua @@ -519,8 +519,11 @@ function run_ytdl_hook(url) if (format == "") then format = "bestvideo+bestaudio/best" end - table.insert(command, "--format") - table.insert(command, format) + + if format ~= "ytdl" then + table.insert(command, "--format") + table.insert(command, format) + end for param, arg in pairs(raw_options) do table.insert(command, "--" .. param) |