mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-31 09:32:03 +02:00
* Return CoverIDRole for artists and albums in a PlayableModel.
This commit is contained in:
@@ -162,6 +162,12 @@ PlayableModel::artistData( const artist_ptr& artist, int role ) const
|
||||
if ( role != Qt::DisplayRole ) // && role != Qt::ToolTipRole )
|
||||
return QVariant();
|
||||
|
||||
if ( role == CoverIDRole )
|
||||
{
|
||||
artist->cover( QSize( 0, 0 ) );
|
||||
return artist->coverId();
|
||||
}
|
||||
|
||||
return artist->name();
|
||||
}
|
||||
|
||||
@@ -181,6 +187,12 @@ PlayableModel::albumData( const album_ptr& album, int role ) const
|
||||
if ( role != Qt::DisplayRole ) // && role != Qt::ToolTipRole )
|
||||
return QVariant();
|
||||
|
||||
if ( role == CoverIDRole )
|
||||
{
|
||||
album->cover( QSize( 0, 0 ) );
|
||||
return album->coverId();
|
||||
}
|
||||
|
||||
return album->name();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user