]> git.sesse.net Git - vlc/commitdiff
Fix GoogleImage warning. Close #3311
authorJean-Baptiste Kempf <jb@videolan.org>
Mon, 22 Feb 2010 22:08:47 +0000 (23:08 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 22 Feb 2010 22:09:22 +0000 (23:09 +0100)
Patch by ale5000

share/lua/meta/art/10_googleimage.lua

index f42714c81ced134a21d6549883c8a7cfdd308c3b..9d0016471547e16717be35b45ab4954c8bb4c107 100644 (file)
@@ -28,13 +28,16 @@ function get_query( title )
 end
 
 -- Return the artwork
--- This is disabled because we have too much false positive by the inherent
--- nature of this script.
-function fetch_art_disabled()
-    local meta = vlc.item:metas()
+function fetch_art()
+       -- This is disabled because we have too much false positive by the inherent nature of this script.
+       if true then vlc.msg.dbg("10_googleimage.lua is disabled") return nil end
+
+       if vlc.input == nil then return nil end
+       local item = vlc.input.item()
+    local meta = item:metas()
     if meta["artist"] and meta["album"] then
         title = meta["artist"].." "..meta["album"]
-    elseif meta["title"] and meta["artist"] then
+    elseif meta["artist"] and meta["title"] then
         title = meta["artist"].." "..meta["title"]
     elseif meta["title"] then
         title = meta["title"]