Commit 009f2b02 authored by Antoine Cellerier's avatar Antoine Cellerier

Update lua meta script to new API (untested).

parent 8a16cc00
...@@ -40,12 +40,12 @@ function fetch_art() ...@@ -40,12 +40,12 @@ function fetch_art()
else else
return nil return nil
end end
fd = vlc.stream_new( "http://images.google.com/images?q=" .. get_query( title ) ) fd = vlc:stream( "http://images.google.com/images?q=" .. get_query( title ) )
page = vlc.stream_read( fd, 65653 ) page = fd:read( 65653 )
vlc.stream_delete( fd ) fd = nil
_, _, arturl = string.find( page, "imgurl=([^&]+)" ) _, _, arturl = string.find( page, "imgurl=([^&]+)" )
if arturl then if arturl then
return vlc.decode_uri(arturl) return vlc.strings.decode_uri(arturl)
else else
return nil return nil
end end
......
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