mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 07:49:42 +01:00
* Fixed not advancing to next track within official releases tree-view.
This commit is contained in:
parent
42d8476ea1
commit
17480fd887
@ -164,11 +164,6 @@ ArtistView::onItemActivated( const QModelIndex& index )
|
||||
m_model->setCurrentItem( item->index );
|
||||
AudioEngine::instance()->playItem( m_proxyModel, item->result() );
|
||||
}
|
||||
else if ( !item->query().isNull() && item->query()->results().count() )
|
||||
{
|
||||
m_model->setCurrentItem( item->index );
|
||||
AudioEngine::instance()->playItem( m_proxyModel, item->query()->results().first() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -337,6 +332,8 @@ ArtistView::onCustomContextMenu( const QPoint& pos )
|
||||
|
||||
if ( item && !item->result().isNull() )
|
||||
queries << item->result()->toQuery();
|
||||
else if ( item && !item->query().isNull() )
|
||||
queries << item->query();
|
||||
if ( item && !item->artist().isNull() )
|
||||
artists << item->artist();
|
||||
if ( item && !item->album().isNull() )
|
||||
|
@ -242,3 +242,16 @@ TreeModelItem::albumName() const
|
||||
|
||||
return QString();
|
||||
}
|
||||
|
||||
|
||||
const Tomahawk::result_ptr&
|
||||
TreeModelItem::result() const
|
||||
{
|
||||
if ( m_result.isNull() && !m_query.isNull() )
|
||||
{
|
||||
if ( m_query->results().count() )
|
||||
return m_query->results().first();
|
||||
}
|
||||
|
||||
return m_result;
|
||||
}
|
||||
|
@ -42,8 +42,8 @@ public:
|
||||
|
||||
const Tomahawk::artist_ptr& artist() const { return m_artist; };
|
||||
const Tomahawk::album_ptr& album() const { return m_album; };
|
||||
const Tomahawk::result_ptr& result() const { return m_result; };
|
||||
const Tomahawk::query_ptr& query() const { return m_query; };
|
||||
const Tomahawk::result_ptr& result() const;
|
||||
|
||||
bool isPlaying() { return m_isPlaying; }
|
||||
void setIsPlaying( bool b ) { m_isPlaying = b; emit dataChanged(); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user