1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-09 23:57:34 +02:00

* Query's resoltSorter needs to take into account the result's online state.

This commit is contained in:
Christian Muehlhaeuser
2013-06-20 10:01:18 +02:00
committed by Michael Zanetti
parent 8e48956c87
commit 53ad9739ad

View File

@@ -304,8 +304,8 @@ Query::id() const
bool bool
Query::resultSorter( const result_ptr& left, const result_ptr& right ) Query::resultSorter( const result_ptr& left, const result_ptr& right )
{ {
const float ls = left->score(); const float ls = left->isOnline() ? left->score() : 0.0;
const float rs = right->score(); const float rs = right->isOnline() ? right->score() : 0.0;
if ( ls == rs ) if ( ls == rs )
{ {
@@ -368,7 +368,7 @@ Query::checkResults()
if ( rp->playable() ) if ( rp->playable() )
playable = true; playable = true;
if ( rp->score() > 0.99 ) if ( rp->isOnline() && rp->score() > 0.99 )
{ {
solved = true; solved = true;
} }