From 0cc00ba5df3c3f6f704e50a2ec8e27275b4059a5 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Thu, 17 Dec 2009 21:40:21 +0000 Subject: [PATCH] Partial fix for #1103 if the per-torrent option for stopping at a ratio has been unchecked, then do not stop it at the global setting. --- deluge/core/torrentmanager.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deluge/core/torrentmanager.py b/deluge/core/torrentmanager.py index e0a42c553..51845046c 100644 --- a/deluge/core/torrentmanager.py +++ b/deluge/core/torrentmanager.py @@ -254,6 +254,10 @@ class TorrentManager(component.Component): def update(self): for torrent_id, torrent in self.torrents.items(): if self.config["stop_seed_at_ratio"] or torrent.options["stop_at_ratio"] and torrent.state not in ("Checking", "Allocating"): + # If the global setting is set, but the per-torrent isn't.. Just skip to the next torrent + # This is so that a user can turn-off the stop at ratio option on a per-torrent basis + if self.config["stop_seed_at_ratio"] and not torrent.options["stop_at_ratio"]: + continue stop_ratio = self.config["stop_seed_ratio"] if torrent.options["stop_at_ratio"]: stop_ratio = torrent.options["stop_ratio"]