diff --git a/src/libtomahawk/network/controlconnection.cpp b/src/libtomahawk/network/controlconnection.cpp index 373129e75..2e122ca96 100644 --- a/src/libtomahawk/network/controlconnection.cpp +++ b/src/libtomahawk/network/controlconnection.cpp @@ -183,7 +183,7 @@ ControlConnection::dbSyncConnection() if ( !m_dbsyncconn ) { setupDbSyncConnection( true ); - Q_ASSERT( m_dbsyncconn ); +// Q_ASSERT( m_dbsyncconn ); } return m_dbsyncconn; diff --git a/src/libtomahawk/playlist/trackproxymodel.cpp b/src/libtomahawk/playlist/trackproxymodel.cpp index edda2bf36..e271bf40b 100644 --- a/src/libtomahawk/playlist/trackproxymodel.cpp +++ b/src/libtomahawk/playlist/trackproxymodel.cpp @@ -137,7 +137,7 @@ TrackProxyModel::siblingItem( int itemsAway ) { PlItem* item = itemFromIndex( mapToSource( idx ) ); qDebug() << item->query()->toString(); - if ( item && item->query()->solved() ) + if ( item && item->query()->playable() ) { qDebug() << "Next PlaylistItem found:" << item->query()->toString() << item->query()->results().at( 0 )->url(); setCurrentItem( idx ); diff --git a/src/libtomahawk/query.cpp b/src/libtomahawk/query.cpp index 159662be1..7a5b54772 100644 --- a/src/libtomahawk/query.cpp +++ b/src/libtomahawk/query.cpp @@ -44,6 +44,7 @@ Query::get( const QString& artist, const QString& track, const QString& album, c Query::Query( const QString& artist, const QString& track, const QString& album, const QID& qid ) : m_solved( false ) + , m_playable( false ) , m_qid( qid ) , m_artist( artist ) , m_album( album ) @@ -167,6 +168,7 @@ Query::checkResults() { bool becameSolved = false; bool becameUnsolved = true; + m_playable = m_results.count() > 0; // hook up signals, and check solved status foreach( const result_ptr& rp, m_results ) diff --git a/src/libtomahawk/query.h b/src/libtomahawk/query.h index 9f7d53fc4..bfa2b3d1d 100644 --- a/src/libtomahawk/query.h +++ b/src/libtomahawk/query.h @@ -59,8 +59,10 @@ public: /// sorter for list of results static bool resultSorter( const result_ptr &left, const result_ptr& right ); - /// solved=true when a perfect result has been found (score of 1.0) + /// true when a perfect result has been found (score of 1.0) bool solved() const { return m_solved; } + /// true when any result has been found (score may be less than 1.0) + bool playable() const { return m_playable; } unsigned int lastPipelineWeight() const { return m_lastpipelineweight; } void setLastPipelineWeight( unsigned int w ) { m_lastpipelineweight = w; } @@ -79,7 +81,7 @@ public: QString album() const { return m_album; } QString track() const { return m_track; } int duration() const { return m_duration; } - + signals: void resultsAdded( const QList& ); void resultsRemoved( const Tomahawk::result_ptr& ); @@ -105,6 +107,7 @@ private: QList< Tomahawk::result_ptr > m_results; bool m_solved; + bool m_playable; mutable QID m_qid; unsigned int m_lastpipelineweight;