void CoverArtLabel::askForUpdate()
{
- THEMIM->getIM()->requestArtUpdate( p_item );
+ THEMIM->getIM()->requestArtUpdate( p_item, true );
}
void CoverArtLabel::setArtFromFile()
{
child = index.child( row, COLUMN_COVER );
if ( child.isValid() && child.data().toString().isEmpty() )
- THEMIM->getIM()->requestArtUpdate( getInputItem( child ) );
+ THEMIM->getIM()->requestArtUpdate( getInputItem( child ), false );
}
}
}
}
}
-void InputManager::requestArtUpdate( input_item_t *p_item )
+void InputManager::requestArtUpdate( input_item_t *p_item, bool b_forced )
{
bool b_current_item = false;
if ( !p_item && hasInput() )
if ( p_item )
{
/* check if it has already been enqueued */
- if ( p_item->p_meta )
+ if ( p_item->p_meta && !b_forced )
{
int status = vlc_meta_GetStatus( p_item->p_meta );
if ( status & ( ITEM_ART_NOTFOUND|ITEM_ART_FETCHED ) )
return;
}
- libvlc_ArtRequest( p_intf->p_libvlc, p_item, META_REQUEST_OPTION_NONE );
+ libvlc_ArtRequest( p_intf->p_libvlc, p_item,
+ (b_forced) ? META_REQUEST_OPTION_ANY
+ : META_REQUEST_OPTION_NONE );
/* No input will signal the cover art to update,
* let's do it ourself */
if ( b_current_item )
bool hasAudio();
bool hasVideo() { return hasInput() && b_video; }
bool hasVisualisation();
- void requestArtUpdate( input_item_t *p_item );
+ void requestArtUpdate( input_item_t *p_item, bool b_forced );
void setArt( input_item_t *p_item, QString fileUrl );
QString getName() { return oldName; }
if( !p_item )
break;
+ meta_fetcher_scope_t e_prev_scope = p_fetcher->e_scope;
+
+ /* scope override */
+ switch ( i_options ) {
+ case META_REQUEST_OPTION_ANY:
+ p_fetcher->e_scope = FETCHER_SCOPE_ANY;
+ break;
+ case META_REQUEST_OPTION_LOCAL:
+ p_fetcher->e_scope = FETCHER_SCOPE_LOCAL;
+ break;
+ case META_REQUEST_OPTION_NETWORK:
+ p_fetcher->e_scope = FETCHER_SCOPE_NETWORK;
+ break;
+ case META_REQUEST_OPTION_NONE:
+ default:
+ break;
+ }
/* Triggers "meta fetcher", eventually fetch meta on the network.
* They are identical to "meta reader" expect that may actually
* takes time. That's why they are running here.
if( i_ret == 1 )
i_ret = DownloadArt( p_fetcher, p_item );
+ p_fetcher->e_scope = e_prev_scope;
/* */
char *psz_name = input_item_GetName( p_item );
if( !i_ret ) /* Art is now in cache */