ytdl_hook: temporarily force disable dash segments formats

This commit is contained in:
Ricardo Constantino 2016-09-22 19:30:06 +01:00 committed by wm4
parent 9179e8ed21
commit 6ba2bbd090
1 changed files with 5 additions and 4 deletions

View File

@ -93,14 +93,15 @@ mp.add_hook("on_load", 10, function ()
if (mp.get_property("options/vid") == "no")
and not option_was_set("ytdl-format") then
format = "bestaudio/best"
format = "bestaudio"
msg.verbose("Video disabled. Only using audio")
end
if (format ~= "") then
table.insert(command, "--format")
table.insert(command, format)
if (format == "") then
format = "bestvideo+bestaudio"
end
table.insert(command, "--format")
table.insert(command, string.format('(%s)[protocol!=http_dash_segments]/best', format))
for param, arg in pairs(raw_options) do
table.insert(command, "--" .. param)