1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-07-31 11:20:22 +02:00

* Make PlayableProxyModel aware of artist and album items when updating detail info.

This commit is contained in:
Christian Muehlhaeuser
2014-08-28 21:18:10 +02:00
parent fd24e3cb28
commit 1ea04025e4

View File

@@ -613,21 +613,24 @@ PlayableProxyModel::columnWeights() const
void
PlayableProxyModel::updateDetailedInfo( const QModelIndex& index )
{
if ( style() != PlayableProxyModel::Short && style() != PlayableProxyModel::Large )
return;
PlayableItem* item = itemFromIndex( mapToSource( index ) );
if ( item->query().isNull() )
return;
if ( style() == PlayableProxyModel::Short || style() == PlayableProxyModel::Large )
if ( item->album() )
{
item->query()->track()->cover( QSize( 0, 0 ) );
item->album()->cover( QSize( 0, 0 ) );
}
if ( style() == PlayableProxyModel::Large )
else if ( item->artist() )
{
item->query()->track()->loadSocialActions();
item->artist()->cover( QSize( 0, 0 ) );
}
else if ( item->query() )
{
// item->query()->track()->cover( QSize( 0, 0 ) );
if ( style() == PlayableProxyModel::Large )
{
item->query()->track()->loadSocialActions();
}
}
}