mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 22:26:32 +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 ( ls == rs )
|
||||||
{
|
{
|
||||||
/* if ( left->collection() && left->collection()->isLocal() )
|
if ( right->purchaseUrl().isEmpty() )
|
||||||
{
|
{
|
||||||
return true;
|
return false;
|
||||||
}*/
|
}
|
||||||
|
|
||||||
if ( right->resolvedByCollection() && right->resolvedByCollection()->isLocal() )
|
if ( right->resolvedByCollection() && right->resolvedByCollection()->isLocal() )
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@@ -421,6 +422,11 @@ Query::resultSorter( const result_ptr& left, const result_ptr& right )
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( left->purchaseUrl().isEmpty() != right->purchaseUrl().isEmpty() )
|
||||||
|
{
|
||||||
|
return left->purchaseUrl().isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
return ls > rs;
|
return ls > rs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user