From 442ff936263e6e9f1da865cc53e8153f09e30702 Mon Sep 17 00:00:00 2001 From: Ricardo Constantino Date: Sat, 6 Jan 2018 18:22:08 +0000 Subject: ytdl_hook: add additional check for comedycentral urls If this breaks another site again, remove this whole if and just leave them as separate playlist items. Close #5364 --- player/lua/ytdl_hook.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'player') diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua index b8fed4b6cb..dbd6e60c65 100644 --- a/player/lua/ytdl_hook.lua +++ b/player/lua/ytdl_hook.lua @@ -404,6 +404,7 @@ mp.add_hook("on_load_fail", 10, function () -- some funky guessing to detect multi-arc videos if self_redirecting_url and #json.entries > 1 + and json.entries[1].protocol == "m3u8_native" and json.entries[1].url then msg.verbose("multi-arc video detected, building EDL") @@ -449,7 +450,7 @@ mp.add_hook("on_load_fail", 10, function () end end - elseif self_redirecting_url then + elseif self_redirecting_url and #json.entries == 1 then msg.verbose("Playlist with single entry detected.") add_single_video(json.entries[1]) else -- cgit v1.2.3