diff options
author | Marcos Pinto <markybob@dipconsultants.com> | 2007-11-18 23:22:36 +0000 |
---|---|---|
committer | Marcos Pinto <markybob@dipconsultants.com> | 2007-11-18 23:22:36 +0000 |
commit | 43ad15b3b23fd2ed0293198f11bf4735a9e4ebee (patch) | |
tree | 467ac51f07ed61e2529542b2d2df9fea15c58c78 | |
parent | 5a01eec2979f0e1fc61639c6991a76718fb7a143 (diff) | |
download | deluge-43ad15b3b23fd2ed0293198f11bf4735a9e4ebee.tar.gz deluge-43ad15b3b23fd2ed0293198f11bf4735a9e4ebee.tar.bz2 deluge-43ad15b3b23fd2ed0293198f11bf4735a9e4ebee.zip |
fix pause all / resume all problems
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | src/core.py | 14 | ||||
-rw-r--r-- | src/pref.py | 2 |
3 files changed, 11 insertions, 8 deletions
@@ -5,7 +5,8 @@ Deluge 0.5.7 (xx November 2007) * Add torrent in paused state option * Fix bug where loaded plugins were forgotten if Deluge crashed * Fix ratio bugs (hopefully for the last time) - * Only show file selection dialog if torrent has more than 1 file + * Add preference to only show file selection popup if torrent has multiple files + * Fix pause all and resume all bugs * Scheduler plugin revamp by Ben Klein * Fix ETA from going backwards * UI warning on full HD - no longer just silently pauses torrents diff --git a/src/core.py b/src/core.py index 1b478eb82..299d5250f 100644 --- a/src/core.py +++ b/src/core.py @@ -735,15 +735,15 @@ of HD space! Oops!\nWe had to pause at least one torrent")) def pause_all(self): for unique_ID in self.unique_IDs: - torrent_state = self.get_core_torrent_state(unique_ID) - if not torrent_state['is_paused']: - self.set_user_pause(unique_ID, True, enforce_queue=False) + self.config.set('max_active_torrents_tmp', \ + self.config.get('max_active_torrents')) + self.config.set('max_active_torrents', 0) + self.apply_prefs() def resume_all(self): - for unique_ID in self.unique_IDs: - torrent_state = self.get_core_torrent_state(unique_ID) - if torrent_state['is_paused']: - self.set_user_pause(unique_ID, False, enforce_queue=True) + self.config.set('max_active_torrents', \ + self.config.get('max_active_torrents_tmp') + self.apply_prefs() def move_storage(self, unique_ID, directory): deluge_core.move_storage(unique_ID, directory) diff --git a/src/pref.py b/src/pref.py index e66c03d7b..d79036b19 100644 --- a/src/pref.py +++ b/src/pref.py @@ -71,6 +71,7 @@ if common.windows_check(): "lock_tray" : False, "max_half_open" : 8, "max_active_torrents" : 8, + "max_active_torrents_tmp" : 8, "max_connections_global" : 200, "max_connections_per_torrent" : -1, "max_download_speed" : -1, @@ -183,6 +184,7 @@ else: "lock_tray" : False, "max_half_open" : 8, "max_active_torrents" : 8, + "max_active_torrents_tmp" : 8, "max_connections_global" : 200, "max_connections_per_torrent" : -1, "max_download_speed" : -1, |