Do not try to pause a torrent that is already paused in the stop_ratio code
This commit is contained in:
parent
237c0978f4
commit
29a8631b6f
|
@ -186,6 +186,7 @@ class TorrentManager(component.Component):
|
||||||
if torrent.stop_at_ratio:
|
if torrent.stop_at_ratio:
|
||||||
stop_ratio = torrent.stop_ratio
|
stop_ratio = torrent.stop_ratio
|
||||||
if torrent.get_ratio() >= stop_ratio and torrent.is_finished:
|
if torrent.get_ratio() >= stop_ratio and torrent.is_finished:
|
||||||
|
if not torrent.handle.is_paused():
|
||||||
torrent.pause()
|
torrent.pause()
|
||||||
if self.config["remove_seed_at_ratio"] or torrent.remove_at_ratio:
|
if self.config["remove_seed_at_ratio"] or torrent.remove_at_ratio:
|
||||||
self.remove(torrent_id)
|
self.remove(torrent_id)
|
||||||
|
|
Loading…
Reference in New Issue