playlist_PreparseLoop(): oneliner fix for psz_arturl checking
authorRafaël Carré <funman@videolan.org>
Tue, 16 Oct 2007 19:43:23 +0000 (19:43 +0000)
committerRafaël Carré <funman@videolan.org>
Tue, 16 Oct 2007 19:43:23 +0000 (19:43 +0000)
We will get the art if either:
    psz_arturl is NULL
    psz_arturl doesn't begin with "file://"

src/playlist/engine.c

index f3cfdb1..097dd0e 100644 (file)
@@ -534,8 +534,7 @@ void playlist_PreparseLoop( playlist_preparse_t *p_obj )
             }
             /* We already have all needed meta, but we need art right now */
             else if( p_playlist->p_fetcher->i_art_policy == ALBUM_ART_ALL &&
-                     psz_arturl &&
-                        strncmp( psz_arturl, "file://", strlen("file://") ) )
+                        ( !psz_arturl || strncmp( psz_arturl, "file://", 7 ) ) )
             {
                 preparse_item_t p;
                 PL_DEBUG("meta ok for %s, need to fetch art", psz_name );