]> git.sesse.net Git - vlc/commitdiff
A really small optim (art fetcher).
authorLaurent Aimar <fenrir@videolan.org>
Sun, 26 Apr 2009 13:49:23 +0000 (15:49 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Sun, 26 Apr 2009 13:49:23 +0000 (15:49 +0200)
src/playlist/fetcher.c

index 787e400d53861fa8830f393be533c9f75d365e16..6136d4cedce5667599aabcf3975ef7de24d03da9 100644 (file)
@@ -197,10 +197,6 @@ static int FindArt( playlist_fetcher_t *p_fetcher, input_item_t *p_item )
     /* */
     psz_album = input_item_GetAlbum( p_item );
     psz_artist = input_item_GetArtist( p_item );
-    psz_title = input_item_GetTitle( p_item );
-    if( !psz_title )
-        psz_title = input_item_GetName( p_item );
-
     if( psz_album && psz_artist )
     {
         msg_Dbg( p_fetcher, "searching art for %s - %s",
@@ -208,10 +204,13 @@ static int FindArt( playlist_fetcher_t *p_fetcher, input_item_t *p_item )
     }
     else
     {
-        msg_Dbg( p_fetcher, "searching art for %s",
-             psz_title );
+        psz_title = input_item_GetTitle( p_item );
+        if( !psz_title )
+            psz_title = input_item_GetName( p_item );
+
+        msg_Dbg( p_fetcher, "searching art for %s", psz_title );
+        free( psz_title );
     }
-    free( psz_title );
 
     /* Fetch the art url */
     p_fetcher->p_private = p_item;