aboutsummaryrefslogtreecommitdiffhomepage
path: root/player/lua
diff options
context:
space:
mode:
authorGravatar ChrisK2 <spam@kalania.de>2015-05-07 20:41:46 +0200
committerGravatar ChrisK2 <spam@kalania.de>2015-05-07 20:41:46 +0200
commit6a0a67034d925a640a9239754c5f06e6e689c27d (patch)
treebc7d4b86b402837c3263db7f3ef820a8091d15a2 /player/lua
parentcd5ab98ff992217abfd0234601c21eb0fe0dbc19 (diff)
ytdl_hook: Escape EDL URLs
Should prevent the EDL parser from tripping over = and , in the URL.
Diffstat (limited to 'player/lua')
-rw-r--r--player/lua/ytdl_hook.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua
index d6fa1ca7c2..a3be2be812 100644
--- a/player/lua/ytdl_hook.lua
+++ b/player/lua/ytdl_hook.lua
@@ -162,7 +162,9 @@ mp.add_hook("on_load", 10, function ()
local playlist = "edl://"
for i, entry in pairs(json.entries) do
- playlist = playlist .. entry.url .. ";"
+ local urllength = string.len(entry.url)
+ playlist = playlist .. "%" .. urllength .. "%" .. entry.url .. ";"
+
end
msg.debug("EDL: " .. playlist)