Fixes for auto end seed ratio.
Torrents will now pause and queue to bottom when ratio is hit.
This commit is contained in:
parent
7be4e7f9b7
commit
221304325a
|
@ -454,6 +454,7 @@ class Manager:
|
|||
ratio = self.calc_ratio(unique_ID, torrent_state)
|
||||
if ratio >= self.get_pref('auto_seed_ratio'):
|
||||
self.queue_bottom(unique_ID, enforce_queue=False) # don't recurse!
|
||||
self.set_user_pause(unique_ID, True, enforce_queue=False)
|
||||
|
||||
# Pause and resume torrents
|
||||
for index in range(len(self.state.queue)):
|
||||
|
@ -569,8 +570,9 @@ class Manager:
|
|||
|
||||
# Miscellaneous minor functions
|
||||
|
||||
def set_user_pause(self, unique_ID, new_value):
|
||||
def set_user_pause(self, unique_ID, new_value, enforce_queue=True):
|
||||
self.unique_IDs[unique_ID].user_paused = new_value
|
||||
if enforce_queue:
|
||||
self.apply_queue()
|
||||
|
||||
def set_ratio(self, unique_ID, num):
|
||||
|
|
|
@ -82,7 +82,7 @@ class PreferencesDlg:
|
|||
self.glade.get_widget("spin_torrents").set_value(self.preferences.get("max_number_torrents", int, default=-1))
|
||||
self.glade.get_widget("chk_seedbottom").set_active(self.preferences.get("queue_seeds_to_bottom", bool, default=False))
|
||||
self.glade.get_widget("chk_autoseed").set_active(self.preferences.get("auto_end_seeding", bool, default=False))
|
||||
self.glade.get_widget("ratio_spinner").set_value(self.preferences.get("auto_seed_ratio", int, default=-1))
|
||||
self.glade.get_widget("ratio_spinner").set_value(self.preferences.get("auto_seed_ratio"))
|
||||
self.glade.get_widget("chk_dht").set_active(self.preferences.get("enable_dht", bool, default=True))
|
||||
self.glade.get_widget("spin_gui").set_value(self.preferences.get("gui_update_interval", float, default=1.0))
|
||||
|
||||
|
|
Loading…
Reference in New Issue