mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-17 11:30:49 +02:00
yay! we have album covers!
This commit is contained in:
@@ -93,18 +93,14 @@ QPixmap DynamicQmlWidget::requestPixmap(const QString &id, QSize *size, const QS
|
|||||||
if( size )
|
if( size )
|
||||||
*size = QSize( width, height );
|
*size = QSize( width, height );
|
||||||
|
|
||||||
QModelIndex index = m_model->index( id.toInt(), 0, QModelIndex() );
|
QModelIndex index = m_proxyModel->mapToSource( m_proxyModel->index( id.toInt(), 0, QModelIndex() ) );
|
||||||
qDebug() << "!*!*!*! got index" << index << id;
|
qDebug() << "!*!*!*! got index" << index << id;
|
||||||
if( index.isValid() ) {
|
if( index.isValid() ) {
|
||||||
PlayableItem *item = m_model->itemFromIndex( index );
|
PlayableItem *item = m_model->itemFromIndex( index );
|
||||||
qDebug() << "item:" << item;
|
qDebug() << "item:" << item;
|
||||||
qDebug() << "item2:" << item->artistName() << item->name();
|
qDebug() << "item2:" << item->artistName() << item->name();
|
||||||
if ( !item->album().isNull() ) {
|
if ( !item->query().isNull() ) {
|
||||||
return item->album()->cover( *size );
|
return item->query()->displayQuery()->cover( *size );
|
||||||
} else if ( !item->artist().isNull() ) {
|
|
||||||
return item->artist()->cover( *size );
|
|
||||||
} else if ( !item->query().isNull() ) {
|
|
||||||
return item->query()->cover( *size );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user