ytdl_hook: don't preappend ytdl:// to non-youtube links in playlists

Close #5003
This commit is contained in:
Ricardo Constantino 2017-12-22 22:12:18 +00:00 committed by Kevin Mitchell
parent 29af787217
commit 1623430b20
1 changed files with 5 additions and 1 deletions

View File

@ -475,7 +475,11 @@ mp.add_hook("on_load", 10, function ()
site = entry["webpage_url"]
end
playlist = playlist .. "ytdl://" .. site .. "\n"
if not (site:find("https?://") == 1) then
site = "ytdl://" .. site
end
playlist = playlist .. site .. "\n"
end
mp.set_property("stream-open-filename", "memory://" .. playlist)