[vlc-commits] lua: fix build soundcloud.lua
Adrian Yanes
git at videolan.org
Sat Apr 21 19:43:53 CEST 2012
vlc/vlc-2.0 | branch: master | Adrian Yanes <devel at ayanes.com> | Wed Apr 18 21:45:01 2012 +0200| [c371aea09861d397dfbd179fe41b73ce3d57e832] | committer: Jean-Baptiste Kempf
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 <linkfanel at yahoo.fr>
(cherry picked from commit 952370a42cfa481e3e5b0896c45a42bdd68e7f1b)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=c371aea09861d397dfbd179fe41b73ce3d57e832
---
share/lua/playlist/soundcloud.lua | 8 ++++----
1 files 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\":\"([^\"]*)\"")
More information about the vlc-commits
mailing list