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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user