aboutsummaryrefslogtreecommitdiffhomepage
path: root/player
diff options
context:
space:
mode:
authorGravatar Ricardo Constantino <wiiaboo@gmail.com>2018-01-06 18:43:46 +0000
committerGravatar Ricardo Constantino <wiiaboo@gmail.com>2018-01-06 18:43:46 +0000
commitcf8855cd2efb2828441dde19a713a34af20b4bc5 (patch)
treea7b1b74376441454d67853b063a2e30d2f5fe58f /player
parent442ff936263e6e9f1da865cc53e8153f09e30702 (diff)
ytdl_hook: check for possible infinite loop in playlist generation
Diffstat (limited to 'player')
-rw-r--r--player/lua/ytdl_hook.lua15
1 files changed, 8 insertions, 7 deletions
diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua
index dbd6e60c65..74095e8e57 100644
--- a/player/lua/ytdl_hook.lua
+++ b/player/lua/ytdl_hook.lua
@@ -464,13 +464,14 @@ mp.add_hook("on_load_fail", 10, function ()
table.insert(playlist, "#EXTINF:0," .. title)
end
- -- some extractors will still return the full info for
- -- all clips in the playlist and the URL will point
- -- 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 (json.entries[1]["_type"] == "url_transparent")
- and not (entry["webpage_url"] == nil) then
+ --[[ some extractors will still return the full info for
+ all clips in the playlist and the URL will point
+ directly to the file in that case, which we don't
+ want so get the webpage URL instead, which is what
+ we want, but only if we aren't going to trigger an
+ infinite loop
+ --]]
+ if not self_redirecting_url then
site = entry["webpage_url"]
end