From cfe029d58fdbf539a9006c8925f948cf828c42d1 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 19 Oct 2008 08:05:36 +0000 Subject: [PATCH] updated seed rank to lower priority for finished, but not seeding torrents --- src/torrent.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/torrent.cpp b/src/torrent.cpp index 3baf03078..abe28c0a3 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -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;