Do not try to pause a torrent that is already paused in the stop_ratio code

This commit is contained in:
Andrew Resch 2008-07-19 02:11:28 +00:00
parent 237c0978f4
commit 29a8631b6f
1 changed files with 2 additions and 1 deletions

View File

@ -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)