diff options
author | Ricardo Constantino <wiiaboo@gmail.com> | 2017-12-22 22:12:18 +0000 |
---|---|---|
committer | Kevin Mitchell <kevmitch@gmail.com> | 2017-12-24 14:13:57 -0700 |
commit | 1623430b200c7bf67ec19bcab13ccbe9a494d2c7 (patch) | |
tree | 0d296436f24645161247ed28d57e794051c05967 /player/lua | |
parent | 29af78721760e426b920904d44566de482e30709 (diff) |
ytdl_hook: don't preappend ytdl:// to non-youtube links in playlists
Close #5003
Diffstat (limited to 'player/lua')
-rw-r--r-- | player/lua/ytdl_hook.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua index 82679a2aa8..c61c38cc99 100644 --- a/player/lua/ytdl_hook.lua +++ b/player/lua/ytdl_hook.lua @@ -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) |