[vlc-devel] [PATCH] lua: fix build soundcloud.lua
Adrian Yanes
devel at ayanes.com
Tue Apr 17 12:45:49 CEST 2012
Details: From Lua 5.2: Change to '\z' escape.
Reject undefined escape sequences. The
proper way to match the dot in Lua is %.
---
share/lua/playlist/soundcloud.lua | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/share/lua/playlist/soundcloud.lua b/share/lua/playlist/soundcloud.lua
index 58f5aac..7b324dc 100644
--- a/share/lua/playlist/soundcloud.lua
+++ b/share/lua/playlist/soundcloud.lua
@@ -23,19 +23,19 @@
-- Probe function.
function probe()
return vlc.access == "http"
- and string.match( vlc.path, "soundcloud\.com/.+/.+" )
+ and string.match( vlc.path, "soundcloud%.com/.+/.+" )
end
-- Parse function.
function parse()
- if string.match ( vlc.path, "soundcloud\.com" ) then
+ if string.match ( vlc.path, "soundcloud%.com" ) 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\":\"([^\"]*)\".*" ..
"\"title\":\"([^\"]*)\"")
--
1.7.9.5
More information about the vlc-devel
mailing list