input/meta.c: Don't re-run the art finder if the art was previously set in input_ArtF...
authorPierre d'Herbemont <pdherbemont@videolan.org>
Fri, 18 Jan 2008 17:13:07 +0000 (17:13 +0000)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Fri, 18 Jan 2008 17:13:07 +0000 (17:13 +0000)
src/input/meta.c

index 544984f..d862176 100644 (file)
@@ -165,12 +165,20 @@ int input_ArtFind( playlist_t *p_playlist, input_item_t *p_item )
     input_FindArtInCache( p_playlist, p_item );
 
     char *psz_arturl = input_item_GetArtURL( p_item );
-    if( psz_arturl && !strncmp( psz_arturl, "file://", strlen( "file://" ) ) )
+    if( psz_arturl )
     {
+        /* We already have an URL */
+        if( !strncmp( psz_arturl, "file://", strlen( "file://" ) ) )
+        {
+            free( psz_arturl );
+            return 0; /* Art is in cache, no need to go further */
+        }
+
         free( psz_arturl );
-        return 0; /* Art is in cache, no need to go further */
+        
+        /* Art need to be put in cache */
+        return 1;
     }
-    free( psz_arturl );
 
     PL_LOCK;
     p_playlist->p_private = p_item;