diff options
author | sfan5 <sfan5@live.de> | 2020-02-23 12:02:01 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2020-02-23 12:04:55 +0100 |
commit | 57ecfb4da290a7c6aadefbdfe30b0319c8944e88 (patch) | |
tree | c6d3bfccf492b0c7b7bd9f55aebd12bb530823c6 /player | |
parent | ee6ad403a7c73e587c6de7ced71861df29413926 (diff) | |
download | mpv-57ecfb4da290a7c6aadefbdfe30b0319c8944e88.tar.bz2 mpv-57ecfb4da290a7c6aadefbdfe30b0319c8944e88.tar.xz |
ytdl_hook: fix URL extraction for manifests
Diffstat (limited to 'player')
-rw-r--r-- | player/lua/ytdl_hook.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua index c388430400..f40a1146e9 100644 --- a/player/lua/ytdl_hook.lua +++ b/player/lua/ytdl_hook.lua @@ -489,8 +489,8 @@ local function add_single_video(json) -- prefer manifest_url if present format_info = "manifest" - local mpd_url = reqfmts and reqfmts[1]["manifest_url"] or - json["manifest_url"] + local mpd_url = requested_formats and + requested_formats[1]["manifest_url"] or json["manifest_url"] if not mpd_url then msg.error("No manifest URL found in JSON data.") return @@ -500,8 +500,8 @@ local function add_single_video(json) streamurl = mpd_url - if reqfmts then - for _, track in pairs(reqfmts) do + if requested_formats then + for _, track in pairs(requested_formats) do max_bitrate = track.tbr > max_bitrate and track.tbr or max_bitrate end |