1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-20 12:52:30 +02:00

Merge pull request #405 from theli-ua/resolver_sort

Sort equal results by resolver's weight
This commit is contained in:
Christian Muehlhaeuser
2016-01-20 22:18:26 +01:00

View File

@@ -403,12 +403,12 @@ Query::resultSorter( const result_ptr& left, const result_ptr& right )
{ {
return false; return false;
} }
if ( !right->isPreview() ) if ( left->isPreview() != right->isPreview() )
{ {
return false; return !left->isPreview();
} }
return true; return left->resolvedBy()->weight() > right->resolvedBy()->weight();
} }
if ( left->isPreview() != right->isPreview() ) if ( left->isPreview() != right->isPreview() )