Fix stop seed ratio to only stop Seeding torrents.
This commit is contained in:
parent
b5078571a2
commit
174ea3c35e
|
@ -65,13 +65,14 @@ class TorrentQueue(component.Component):
|
||||||
stop_ratio = self.config["stop_seed_ratio"]
|
stop_ratio = self.config["stop_seed_ratio"]
|
||||||
|
|
||||||
for torrent_id in self.torrents.get_torrent_list():
|
for torrent_id in self.torrents.get_torrent_list():
|
||||||
if self.torrents[torrent_id].get_ratio() >= stop_ratio:
|
if self.torrents[torrent_id].handle.is_seed():
|
||||||
# This torrent is at or exceeding the stop ratio so we need to
|
if self.torrents[torrent_id].get_ratio() >= stop_ratio:
|
||||||
# pause or remove it from the session.
|
# This torrent is at or exceeding the stop ratio so we need to
|
||||||
if self.config["remove_seed_at_ratio"]:
|
# pause or remove it from the session.
|
||||||
self.torrents.remove(torrent_id, False, False)
|
if self.config["remove_seed_at_ratio"]:
|
||||||
else:
|
self.torrents.remove(torrent_id, False, False)
|
||||||
self.torrents[torrent_id].pause()
|
else:
|
||||||
|
self.torrents[torrent_id].pause()
|
||||||
|
|
||||||
def update_queue(self):
|
def update_queue(self):
|
||||||
# Updates the queueing order and max active states
|
# Updates the queueing order and max active states
|
||||||
|
|
Loading…
Reference in New Issue