mirror of https://github.com/mpv-player/mpv
parent
33e5755c23
commit
0da5688c84
|
@ -396,12 +396,15 @@ mp.add_hook("on_load", 10, function ()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local self_redirecting_url =
|
||||||
|
json.entries[1]["_type"] ~= "url_transparent" and
|
||||||
|
json.entries[1]["webpage_url"] and
|
||||||
|
json.entries[1]["webpage_url"] == json["webpage_url"]
|
||||||
|
|
||||||
|
|
||||||
-- some funky guessing to detect multi-arc videos
|
-- some funky guessing to detect multi-arc videos
|
||||||
if (not (json.entries[1]["_type"] == "url_transparent")) and
|
if self_redirecting_url and #json.entries > 1
|
||||||
(not (json.entries[1]["webpage_url"] == nil)
|
and json.entries[1].url then
|
||||||
and (json.entries[1]["webpage_url"] == json["webpage_url"]))
|
|
||||||
and not (json.entries[1].url == nil) then
|
|
||||||
msg.verbose("multi-arc video detected, building EDL")
|
msg.verbose("multi-arc video detected, building EDL")
|
||||||
|
|
||||||
local playlist = edl_track_joined(json.entries)
|
local playlist = edl_track_joined(json.entries)
|
||||||
|
@ -446,11 +449,7 @@ mp.add_hook("on_load", 10, function ()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
elseif (not (json.entries[1]["_type"] == "url_transparent")) and
|
elseif self_redirecting_url then
|
||||||
(not (json.entries[1]["webpage_url"] == nil)
|
|
||||||
and (json.entries[1]["webpage_url"] == json["webpage_url"]))
|
|
||||||
and (#json.entries == 1) then
|
|
||||||
|
|
||||||
msg.verbose("Playlist with single entry detected.")
|
msg.verbose("Playlist with single entry detected.")
|
||||||
add_single_video(json.entries[1])
|
add_single_video(json.entries[1])
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue