[vlc-devel] commit: Update lua meta script to new API (untested). (Antoine Cellerier )

git version control git at videolan.org
Sun Jun 15 13:04:32 CEST 2008


vlc | branch: master | Antoine Cellerier <dionoea at videolan.org> | Fri Jun 13 11:51:31 2008 +0200| [009f2b02c21d1d1e6e3e04d0766ecbde9f1facd9]

Update lua meta script to new API (untested).

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=009f2b02c21d1d1e6e3e04d0766ecbde9f1facd9
---

 share/lua/meta/googleimage.lua |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/share/lua/meta/googleimage.lua b/share/lua/meta/googleimage.lua
index 6bc7456..8c27663 100644
--- a/share/lua/meta/googleimage.lua
+++ b/share/lua/meta/googleimage.lua
@@ -40,12 +40,12 @@ function fetch_art()
     else
         return nil
     end
-    fd = vlc.stream_new( "http://images.google.com/images?q=" .. get_query( title ) )
-    page = vlc.stream_read( fd, 65653 )
-    vlc.stream_delete( fd )
+    fd = vlc:stream( "http://images.google.com/images?q=" .. get_query( title ) )
+    page = fd:read( 65653 )
+    fd = nil
     _, _, arturl = string.find( page, "imgurl=([^&]+)" )
     if arturl then
-        return vlc.decode_uri(arturl)
+        return vlc.strings.decode_uri(arturl)
     else
         return nil
     end




More information about the vlc-devel mailing list