mirror of
https://github.com/codex-storage/deluge.git
synced 2025-03-01 11:30:43 +00:00
Fixes an issue with clear_max_ratio_torrents and changes pause/resume block in
Manager.apply_queue() to use enumerate. Patch is from eternalswd, thanks.
This commit is contained in:
parent
3ec15816ac
commit
946a86c815
@ -489,8 +489,7 @@ class Manager:
|
||||
self.set_user_pause(unique_ID, True, enforce_queue=False)
|
||||
|
||||
if self.get_pref('clear_max_ratio_torrents'):
|
||||
for index in range(len(self.state.queue)):
|
||||
unique_ID = self.state.queue[index]
|
||||
for unique_ID in self.state.queue:
|
||||
torrent_state = self.get_core_torrent_state(unique_ID)
|
||||
if torrent_state['is_seed']:
|
||||
ratio = self.calc_ratio(unique_ID, torrent_state)
|
||||
@ -499,8 +498,7 @@ class Manager:
|
||||
self.remove_torrent(unique_ID, False, True)
|
||||
|
||||
# Pause and resume torrents
|
||||
for index in range(len(self.state.queue)):
|
||||
unique_ID = self.state.queue[index]
|
||||
for index, unique_ID in enumerate(self.state.queue):
|
||||
torrent_state = self.get_core_torrent_state(unique_ID)
|
||||
if (index < self.get_pref('max_active_torrents') or \
|
||||
self.get_pref('max_active_torrents') == -1) and \
|
||||
|
Loading…
x
Reference in New Issue
Block a user