back port torrent sorting fix into trunk

This commit is contained in:
Arvid Norberg 2012-01-17 02:27:20 +00:00
parent d52eb9ed19
commit 74b745e876
1 changed files with 4 additions and 1 deletions

View File

@ -292,7 +292,10 @@ bool compare_torrent(torrent_status const* lhs, torrent_status const* rhs)
else if (lhs->queue_position == -1 && rhs->queue_position == -1)
{
// both are seeding, sort by seed-rank
return lhs->seed_rank > rhs->seed_rank;
if (lhs->seed_rank != rhs->seed_rank)
return lhs->seed_rank > rhs->seed_rank;
return lhs->info_hash < rhs->info_hash;
}
return (lhs->queue_position == -1) < (rhs->queue_position == -1);