From 29a8631b6fb7fa0c5fd051df57e04ffd5a26ff29 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Sat, 19 Jul 2008 02:11:28 +0000 Subject: [PATCH] Do not try to pause a torrent that is already paused in the stop_ratio code --- deluge/core/torrentmanager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deluge/core/torrentmanager.py b/deluge/core/torrentmanager.py index d8a7d563b..004043df7 100644 --- a/deluge/core/torrentmanager.py +++ b/deluge/core/torrentmanager.py @@ -186,7 +186,8 @@ class TorrentManager(component.Component): if torrent.stop_at_ratio: stop_ratio = torrent.stop_ratio if torrent.get_ratio() >= stop_ratio and torrent.is_finished: - torrent.pause() + if not torrent.handle.is_paused(): + torrent.pause() if self.config["remove_seed_at_ratio"] or torrent.remove_at_ratio: self.remove(torrent_id)