Commit 21614a27 authored by François Cartegnie's avatar François Cartegnie 🤞
Browse files

Qt: PLModel: make auto art download comply with privacy policy

parent 112a32a0
......@@ -391,7 +391,11 @@ QVariant PLModel::data( const QModelIndex &index, const int role ) const
}
else if( role == Qt::ToolTipRole )
{
QString artUrl = getArtUrl( index );
int i_art_policy = var_GetInteger( p_playlist, "album-art" );
QString artUrl;
/* FIXME: Skip, as we don't want the pixmap and do not know the cached art file */
if ( i_art_policy == ALBUM_ART_ALL )
artUrl = getArtUrl( index );
if ( artUrl.isEmpty() ) artUrl = ":/noart";
QString duration = qtr( "unknown" );
QString name;
......@@ -1031,6 +1035,8 @@ void PLModel::ensureArtRequested( const QModelIndex &index )
{
if ( index.isValid() && hasChildren( index ) )
{
int i_art_policy = var_GetInteger( p_playlist, "album-art" );
if ( i_art_policy != ALBUM_ART_ALL ) return;
int nbnodes = rowCount( index );
QModelIndex child;
for( int row = 0 ; row < nbnodes ; row++ )
......
......@@ -643,8 +643,7 @@ void InputManager::requestArtUpdate( input_item_t *p_item )
if ( p_item->p_meta )
{
int status = vlc_meta_GetStatus( p_item->p_meta );
if ( status & ( ITEM_ART_NOTFOUND|ITEM_ART_FETCHED|
ITEM_ARTURL_FETCHED|ITEM_PREPARSED ) )
if ( status & ( ITEM_ART_NOTFOUND|ITEM_ART_FETCHED ) )
return;
}
playlist_AskForArtEnqueue( pl_Get(p_intf), p_item );
......
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