summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRicardo Constantino <wiiaboo@gmail.com>2016-05-29 21:22:53 +0100
committerwm4 <wm4@nowhere>2016-05-30 16:57:43 +0200
commit256d9d2b896be69e8a313e485dd4a643f9b2fc53 (patch)
tree4d7a3b787e9912f93f33fbe0055d0c234eabba6b
parentb1dd3beda9991a02b63c032faefcd4d9331f5f7c (diff)
downloadmpv-256d9d2b896be69e8a313e485dd4a643f9b2fc53.tar.bz2
mpv-256d9d2b896be69e8a313e485dd4a643f9b2fc53.tar.xz
ytdl: fix brightcove urls
-rw-r--r--player/lua/ytdl_hook.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua
index fb59aa3301..9f94951893 100644
--- a/player/lua/ytdl_hook.lua
+++ b/player/lua/ytdl_hook.lua
@@ -153,8 +153,9 @@ mp.add_hook("on_load", 10, function ()
-- some funky guessing to detect multi-arc videos
- if not (json.entries[1]["webpage_url"] == nil)
- and (json.entries[1]["webpage_url"] == json["webpage_url"]) then
+ if (not (json.entries[1]["_type"] == "url_transparent")) and
+ (not (json.entries[1]["webpage_url"] == nil)
+ and (json.entries[1]["webpage_url"] == json["webpage_url"])) then
msg.verbose("multi-arc video detected, building EDL")
local playlist = "edl://"
@@ -205,7 +206,8 @@ mp.add_hook("on_load", 10, function ()
-- directly to the file in that case, which we don't
-- want so get the webpage URL instead, which is what
-- we want
- if not (entry["webpage_url"] == nil) then
+ if not (json.entries[1]["_type"] == "url_transparent")
+ and not (entry["webpage_url"] == nil) then
site = entry["webpage_url"]
end