From 174ea3c35e826e0f7de8769761497a52e55fe756 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Mon, 10 Mar 2008 10:33:29 +0000 Subject: [PATCH] Fix stop seed ratio to only stop Seeding torrents. --- deluge/core/torrentqueue.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/deluge/core/torrentqueue.py b/deluge/core/torrentqueue.py index 49033e28d..c19c548e2 100644 --- a/deluge/core/torrentqueue.py +++ b/deluge/core/torrentqueue.py @@ -65,13 +65,14 @@ class TorrentQueue(component.Component): stop_ratio = self.config["stop_seed_ratio"] for torrent_id in self.torrents.get_torrent_list(): - if self.torrents[torrent_id].get_ratio() >= stop_ratio: - # This torrent is at or exceeding the stop ratio so we need to - # pause or remove it from the session. - if self.config["remove_seed_at_ratio"]: - self.torrents.remove(torrent_id, False, False) - else: - self.torrents[torrent_id].pause() + if self.torrents[torrent_id].handle.is_seed(): + if self.torrents[torrent_id].get_ratio() >= stop_ratio: + # This torrent is at or exceeding the stop ratio so we need to + # pause or remove it from the session. + if self.config["remove_seed_at_ratio"]: + self.torrents.remove(torrent_id, False, False) + else: + self.torrents[torrent_id].pause() def update_queue(self): # Updates the queueing order and max active states