1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-07-31 03:10:12 +02:00

Fixed Query::resultSorter to take previews into account.

This commit is contained in:
Christian Muehlhaeuser
2015-03-31 08:50:20 +02:00
parent 5755e94675
commit 62812a05f6

View File

@@ -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;
}