diff options
Diffstat (limited to 'player/lua')
-rw-r--r-- | player/lua/ytdl_hook.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua index f757e5a28b..7b0e9222e9 100644 --- a/player/lua/ytdl_hook.lua +++ b/player/lua/ytdl_hook.lua @@ -80,6 +80,7 @@ mp.add_hook("on_load", 10, function () end local format = mp.get_property("options/ytdl-format") + local raw_options = mp.get_property_native("options/ytdl-raw-options") -- subformat workaround local subformat = "ass/srt/best" @@ -92,6 +93,12 @@ mp.add_hook("on_load", 10, function () table.insert(command, "--format") table.insert(command, format) end + for param, arg in pairs(raw_options) do + table.insert(command, "--" .. param) + if (arg ~= "") then + table.insert(command, arg) + end + end table.insert(command, "--") table.insert(command, url) local es, json = exec(command) |