From 9eaf2e602aa3a9f2c0654176700854c07b07f5a6 Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Tue, 11 Dec 2007 01:08:49 +0000 Subject: [PATCH] fix seeding ratio stop on finished torrents --- src/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core.py b/src/core.py index 683f1d8ab..3bc3449fe 100644 --- a/src/core.py +++ b/src/core.py @@ -579,7 +579,7 @@ Space:") + " " + nice_free) for unique_ID in self.unique_IDs: torrent_state = self.get_core_torrent_state(unique_ID) - if torrent_state['is_seed'] and not torrent_state['is_paused']: + if (torrent_state["total_wanted"] - torrent_state["total_wanted_done"] == 0) and not torrent_state['is_paused']: ratio = self.calc_ratio(unique_ID, torrent_state) if ratio >= self.get_pref('auto_seed_ratio'): self.queue_bottom(unique_ID, enforce_queue=False) # don't recurse! @@ -588,7 +588,7 @@ Space:") + " " + nice_free) if self.get_pref('clear_max_ratio_torrents'): for unique_ID in self.unique_IDs.keys(): torrent_state = self.get_core_torrent_state(unique_ID) - if torrent_state['is_seed']: + if (torrent_state["total_wanted"] - torrent_state["total_wanted_done"] == 0): ratio = self.calc_ratio(unique_ID, torrent_state) if ratio >= self.get_pref('auto_seed_ratio'): self.removed_unique_ids[unique_ID] = 1