From 43c13e5ea23230edca38426d4a9eed049a70890e Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 19 Feb 2020 16:31:04 +0100 Subject: ytdl_hook: add a way to not pass --format to the command line Might be helpful for... whatever. --- player/lua/ytdl_hook.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'player') 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) -- cgit v1.2.3