Commit 952370a4 authored by Adrian Yanes's avatar Adrian Yanes Committed by Pierre Ynard

lua: fix build soundcloud.lua

Details: From Lua 5.2: Change to '\z' escape.
Reject undefined escape sequences. The
proper way to match the dot in Lua is %.
Signed-off-by: Pierre Ynard's avatarPierre Ynard <>
parent 93e26234
......@@ -23,19 +23,19 @@
-- Probe function.
function probe()
return vlc.access == "http"
and string.match( vlc.path, "soundcloud\.com/.+/.+" )
and string.match( vlc.path, "" )
-- Parse function.
function parse()
if string.match ( vlc.path, "soundcloud\.com" ) then
if string.match ( vlc.path, "" ) then
while true do
line = vlc.readline()
if not line then break end
if string.match( line, "window\.SC\.bufferTracks\.push" ) then
if string.match( line, "window%.SC%.bufferTracks%.push" ) then
-- all the data is nicely stored on this one line
_,_,uid,token,name = string.find (line,
"window\.SC\.bufferTracks\.push.*" ..
"window%.SC%.bufferTracks%.push.*" ..
"\"uid\":\"([^\"]*)\".*" ..
"\"token\":\"([^\"]*)\".*" ..
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment