diff --git a/ChangeLog b/ChangeLog index f1c8ce89a..5baa52ad8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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,