- int i_ret;
-
- /* Check if it is not yet preparsed and if so wait for it (at most 0.5s)
- * (This can happen if we fetch art on play)
- * FIXME this doesn't work if we need to fetch meta before art ... */
- for( i_ret = 0; i_ret < 10 && !input_item_IsPreparsed( p_item ); i_ret++ )
- {
- vlc_bool_t b_break;
- PL_LOCK;
- b_break = ( !p_playlist->p_input || input_GetItem(p_playlist->p_input) != p_item ||
- p_playlist->p_input->b_die || p_playlist->p_input->b_eof || p_playlist->p_input->b_error );
- PL_UNLOCK;
- if( b_break )
- break;
- msleep( 50000 );
- }
-
- i_ret = input_ArtFind( p_playlist, p_item );
- if( i_ret == 1 )
- {
- PL_DEBUG("downloading art for %s", p_item->psz_name );
- if( input_DownloadAndCacheArt( p_playlist, p_item ) )
- input_item_SetArtNotFound( p_item, VLC_TRUE );
- else {
- input_item_SetArtFetched( p_item, VLC_TRUE );
- var_SetInteger( p_playlist, "item-change",
- p_item->i_id );
- }
- }
- else if( i_ret == 0 ) /* Was in cache */
- {
- PL_DEBUG("found art for %s in cache", p_item->psz_name );
- input_item_SetArtFetched( p_item, VLC_TRUE );
- var_SetInteger( p_playlist, "item-change", p_item->i_id );
- }
- else
- {
- PL_DEBUG("art not found for %s", p_item->psz_name );
- input_item_SetArtNotFound( p_item, VLC_TRUE );
- }
- vlc_gc_decref( p_item );
- }
+ PL_DEBUG( "art not found for %s", p_item->psz_name );
+ input_item_SetArtNotFound( p_item, true );
+ }
+ vlc_gc_decref( p_item );