1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-06 14:16:32 +02:00

* Don't try to play unavailable results.

This commit is contained in:
Christian Muehlhaeuser
2011-08-16 03:08:11 +02:00
parent b6fcae3a4a
commit 16f32253c3
2 changed files with 3 additions and 1 deletions

View File

@@ -487,6 +487,8 @@ AudioEngine::playItem( Tomahawk::PlaylistInterface* playlist, const Tomahawk::re
{
tDebug( LOGEXTRA ) << Q_FUNC_INFO << ( result.isNull() ? QString() : result->url() );
if ( !result->isOnline() )
return;
if ( !m_playlist.isNull() )
m_playlist.data()->reset();

View File

@@ -144,7 +144,7 @@ ArtistView::onItemActivated( const QModelIndex& index )
ViewManager::instance()->show( item->artist() );
else if ( !item->album().isNull() )
ViewManager::instance()->show( item->album() );
else if ( !item->result().isNull() )
else if ( !item->result().isNull() && item->result()->isOnline() )
{
m_model->setCurrentItem( item->index );
AudioEngine::instance()->playItem( m_proxyModel, item->result() );