1 -- Get's an artwork from images.google.com
4 -- Replace non alphanumeric char by +
5 function get_query( title )
6 return string.gsub( title, "([^%w ])",
7 function (c) return string.format ("%%%02X", string.byte(c)) end)
12 if vlc.title and vlc.artist then
13 title = vlc.artist.." "..vlc.title
21 fd = vlc.stream_new( "http://images.google.com/images?q=" .. get_query( title ) )
22 page = vlc.stream_read( fd, 65653 )
23 vlc.stream_delete( fd )
24 _, _, arturl = string.find( page, "imgurl=([^&]+)" )
25 return vlc.decode_uri(arturl)