[vlc-devel] [PATCH] lua soundcloud: fetch artwork
Ludovic Fauvet
etix at videolan.org
Wed Sep 12 15:06:25 CEST 2012
---
share/lua/playlist/soundcloud.lua | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/share/lua/playlist/soundcloud.lua b/share/lua/playlist/soundcloud.lua
index 7b324dc..6bc8482 100644
--- a/share/lua/playlist/soundcloud.lua
+++ b/share/lua/playlist/soundcloud.lua
@@ -29,6 +29,7 @@ end
-- Parse function.
function parse()
if string.match ( vlc.path, "soundcloud%.com" ) then
+ arturl = ""
while true do
line = vlc.readline()
if not line then break end
@@ -42,9 +43,13 @@ function parse()
-- we only want the first one of these lines
break
end
+ -- try to get the art url
+ if string.match( line, "artwork--download--link" ) then
+ _,_,arturl = string.find( line, "href=\"(.*)\" " )
+ end
end
path = "http://media.soundcloud.com/stream/"..uid.."?stream_token="..token
- return { { path = path; name = name } }
+ return { { path = path; name = name; arturl = arturl } }
end
return {}
end
--
1.7.12
More information about the vlc-devel
mailing list