mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-07 06:36:55 +02:00
* Fixed not advancing to next track within official releases tree-view.
This commit is contained in:
@@ -164,11 +164,6 @@ ArtistView::onItemActivated( const QModelIndex& index )
|
|||||||
m_model->setCurrentItem( item->index );
|
m_model->setCurrentItem( item->index );
|
||||||
AudioEngine::instance()->playItem( m_proxyModel, item->result() );
|
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() )
|
if ( item && !item->result().isNull() )
|
||||||
queries << item->result()->toQuery();
|
queries << item->result()->toQuery();
|
||||||
|
else if ( item && !item->query().isNull() )
|
||||||
|
queries << item->query();
|
||||||
if ( item && !item->artist().isNull() )
|
if ( item && !item->artist().isNull() )
|
||||||
artists << item->artist();
|
artists << item->artist();
|
||||||
if ( item && !item->album().isNull() )
|
if ( item && !item->album().isNull() )
|
||||||
|
@@ -242,3 +242,16 @@ TreeModelItem::albumName() const
|
|||||||
|
|
||||||
return QString();
|
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::artist_ptr& artist() const { return m_artist; };
|
||||||
const Tomahawk::album_ptr& album() const { return m_album; };
|
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::query_ptr& query() const { return m_query; };
|
||||||
|
const Tomahawk::result_ptr& result() const;
|
||||||
|
|
||||||
bool isPlaying() { return m_isPlaying; }
|
bool isPlaying() { return m_isPlaying; }
|
||||||
void setIsPlaying( bool b ) { m_isPlaying = b; emit dataChanged(); }
|
void setIsPlaying( bool b ) { m_isPlaying = b; emit dataChanged(); }
|
||||||
|
Reference in New Issue
Block a user