]> git.sesse.net Git - vlc/blobdiff - src/playlist/art.c
Obsolete confusing --miface-addr option and rework net_SetMcastOut()
[vlc] / src / playlist / art.c
index 315fd4e62b19ca5ed6678b132f25b52b6f101b65..932efc76eb5151d38ed256664519854a373e361f 100644 (file)
@@ -35,8 +35,6 @@
 #include <vlc_url.h>
 #include <vlc_md5.h>
 
-#include <limits.h>                                             /* PATH_MAX */
-
 #ifdef HAVE_SYS_STAT_H
 #   include <sys/stat.h>
 #endif
@@ -122,7 +120,7 @@ static char *ArtCachePath( input_item_t *p_item )
     psz_album = vlc_meta_Get( p_item->p_meta, vlc_meta_Album );
     psz_arturl = vlc_meta_Get( p_item->p_meta, vlc_meta_ArtworkURL );
 
-    if( (!psz_artist || !psz_album ) && !psz_arturl )
+    if( (EMPTY_STR(psz_artist) || EMPTY_STR(psz_album) ) && !psz_arturl )
         goto end;
 
     psz_path = ArtCacheGetDirPath( psz_arturl, psz_artist, psz_album );
@@ -178,7 +176,7 @@ int playlist_FindArtInCache( input_item_t *p_item )
             if( asprintf( &psz_file, "%s" DIR_SEP "%s",
                           psz_path, psz_filename ) != -1 )
             {
-                char *psz_uri = make_URI( psz_file );
+                char *psz_uri = make_URI( psz_file, "file" );
                 if( psz_uri )
                 {
                     input_item_SetArtURL( p_item, psz_uri );
@@ -208,7 +206,7 @@ int playlist_SaveArt( playlist_t *p_playlist, input_item_t *p_item,
     if( !psz_filename )
         return VLC_EGENERIC;
 
-    char *psz_uri = make_URI( psz_filename );
+    char *psz_uri = make_URI( psz_filename, "file" );
     if( !psz_uri )
     {
         free( psz_filename );