Commit 706d6346 authored by Ilkka Ollakka's avatar Ilkka Ollakka

Googleimage to use artist-tag and do url-encode (example taken from
http://www.redwiki.net/wiki/wiki.php/LUA/URLencode%B1%B8%C7%F6%C4ڵ%E5 )

parent bd32a50c
......@@ -3,12 +3,15 @@
-- Replace non alphanumeric char by +
function get_query( title )
return title:gsub( "[^(a-z|A-Z|0-9)]", "+" )
return string.gsub( title, "([^%w ])",
function (c) return string.format ("%%%02X", string.byte(c)) end)
end
-- Return the artwork
function fetch_art()
if vlc.title then
if vlc.title and vlc.artist then
title = vlc.artist.." "..vlc.title
elseif vlc.title then
title = vlc.title
elseif vlc.name then
title = vlc.name
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment