Commit f4af45cf authored by Rafaël Carré's avatar Rafaël Carré

album art: the corrects picture URLs begin with "file://" else, we have to...

album art: the corrects picture URLs begin with "file://" else, we have to download/extract/look in the cache
sets the ArtworkURL to the file in cache also when it had been extracted previously
parent 758e2cb4
......@@ -165,7 +165,7 @@ 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( !EMPTY_STR( psz_arturl ) )
if( !strncmp( psz_arturl, "file://", strlen( "file://" ) ) )
{
free( psz_arturl );
return 0; /* Art is in cache, no need to go further */
......@@ -542,7 +542,10 @@ void input_ExtractAttachmentAndCacheArt( input_thread_t *p_input )
/* Check if we already dumped it */
if( !utf8_stat( psz_filename+7, &s ) )
{
vlc_meta_Set( p_item->p_meta, vlc_meta_ArtworkURL, psz_filename );
return;
}
f = utf8_fopen( psz_filename+7, "w" );
if( f )
......
......@@ -534,7 +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 &&
EMPTY_STR( psz_arturl ) )
strncmp( psz_arturl, "file://", strlen("file://") ) )
{
preparse_item_t p;
PL_DEBUG("meta ok for %s, need to fetch art", psz_name );
......
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