diff --git a/src/libtomahawk/Query.cpp b/src/libtomahawk/Query.cpp index c3a8e92a1..c8f6cfef1 100644 --- a/src/libtomahawk/Query.cpp +++ b/src/libtomahawk/Query.cpp @@ -409,10 +409,11 @@ Query::resultSorter( const result_ptr& left, const result_ptr& right ) if ( ls == rs ) { -/* if ( left->collection() && left->collection()->isLocal() ) + if ( right->purchaseUrl().isEmpty() ) { - return true; - }*/ + return false; + } + if ( right->resolvedByCollection() && right->resolvedByCollection()->isLocal() ) { return false; @@ -421,6 +422,11 @@ Query::resultSorter( const result_ptr& left, const result_ptr& right ) return true; } + if ( left->purchaseUrl().isEmpty() != right->purchaseUrl().isEmpty() ) + { + return left->purchaseUrl().isEmpty(); + } + return ls > rs; }