Commit 6830d8e6 authored by Rafaël Carré's avatar Rafaël Carré

Remembers art url when an input with same artist & album needs art, so if it's...

Remembers art url when an input with same artist & album needs art, so if it's a local file, it doesn't need to be copied in the cache.
parent edff9427
......@@ -215,6 +215,7 @@ typedef struct playlist_album_t
{
char *psz_artist;
char *psz_album;
char *psz_arturl;
vlc_bool_t b_found;
} playlist_album_t;
......
......@@ -110,7 +110,7 @@ int input_MetaFetch( playlist_t *p_playlist, input_item_t *p_item )
}
/* Return codes:
* 0 : Art is in cache
* 0 : Art is in cache or is a local file
* 1 : Art found, need to download
* -X : Error/not found
*/
......@@ -145,7 +145,9 @@ int input_ArtFind( playlist_t *p_playlist, input_item_t *p_item )
free( psz_album );
if( album.b_found )
{
/* Actually get URL from cache */
if( !strncmp( album.psz_arturl, "file://", 7 ) )
input_item_SetArtURL( p_item, album.psz_arturl );
else /* Actually get URL from cache */
input_FindArtInCache( p_playlist, p_item );
return 0;
}
......@@ -202,6 +204,7 @@ int input_ArtFind( playlist_t *p_playlist, input_item_t *p_item )
playlist_album_t a;
a.psz_artist = psz_artist;
a.psz_album = psz_album;
a.psz_arturl = input_item_GetArtURL( p_item );
a.b_found = (i_ret == VLC_EGENERIC ? VLC_FALSE : VLC_TRUE );
ARRAY_APPEND( p_playlist->p_fetcher->albums, a );
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment