diff options
author | ▟ ▖▟ ▖ <dodo.the.last@gmail.com> | 2016-03-10 16:21:28 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-03-10 22:46:03 +0100 |
commit | f7244ebe9b08160934feeb41a3e74efc0936ef4f (patch) | |
tree | aedb1de9114d0d1e53f877e787635695248384a6 /player/lua | |
parent | 0e1e4005fb231dee4a86322d308870cfd765b751 (diff) |
ytdl_hook: handle optional format_note
some extractors don't return a format_note for their audio stream which
resulted in commandv complaining "argument 4 is not a string" (got nil).
Diffstat (limited to 'player/lua')
-rw-r--r-- | player/lua/ytdl_hook.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua index 5b90b95cdd..c0ce8b97c4 100644 --- a/player/lua/ytdl_hook.lua +++ b/player/lua/ytdl_hook.lua @@ -207,7 +207,7 @@ mp.add_hook("on_load", 10, function () -- audio url mp.commandv("audio-add", json["requested_formats"][2].url, - "select", json["requested_formats"][2]["format_note"]) + "select", json["requested_formats"][2]["format_note"] or "") elseif not (json.url == nil) then -- normal video |