updated seed rank to lower priority for finished, but not seeding torrents

This commit is contained in:
Arvid Norberg 2008-10-19 08:05:36 +00:00
parent 9c3677794b
commit cfe029d58f
1 changed files with 5 additions and 2 deletions

View File

@ -3898,7 +3898,10 @@ namespace libtorrent
prio_mask = 0xfffff
};
if (!is_seed()) return 0;
if (!is_finished()) return 0;
int scale = 100;
if (!is_seed()) scale = 50;
int ret = 0;
@ -3938,7 +3941,7 @@ namespace libtorrent
}
else
{
ret |= (downloaders * 100 / seeds) & prio_mask;
ret |= (downloaders * scale / seeds) & prio_mask;
}
return ret;