From 53ad9739ad7002284250e0eadd995c35549109ea Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Thu, 20 Jun 2013 10:01:18 +0200 Subject: [PATCH] * Query's resoltSorter needs to take into account the result's online state. --- src/libtomahawk/Query.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libtomahawk/Query.cpp b/src/libtomahawk/Query.cpp index bf0bcd0d4..6fbb062d7 100644 --- a/src/libtomahawk/Query.cpp +++ b/src/libtomahawk/Query.cpp @@ -304,8 +304,8 @@ Query::id() const bool Query::resultSorter( const result_ptr& left, const result_ptr& right ) { - const float ls = left->score(); - const float rs = right->score(); + const float ls = left->isOnline() ? left->score() : 0.0; + const float rs = right->isOnline() ? right->score() : 0.0; if ( ls == rs ) { @@ -368,7 +368,7 @@ Query::checkResults() if ( rp->playable() ) playable = true; - if ( rp->score() > 0.99 ) + if ( rp->isOnline() && rp->score() > 0.99 ) { solved = true; }