diff --git a/src/core.py b/src/core.py index 2333e9d60..0b1be402e 100644 --- a/src/core.py +++ b/src/core.py @@ -741,15 +741,17 @@ of HD space! Oops!\nWe had to pause at least one torrent")) self.apply_prefs_per_torrent(unique_ID) def pause_all(self): - self.config.set('max_active_torrents_tmp', \ - self.config.get('max_active_torrents')) - self.config.set('max_active_torrents', 0) - self.apply_prefs() + if self.config.set('max_active_torrents') != 0: + 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): - self.config.set('max_active_torrents', \ - self.config.get('max_active_torrents_tmp')) - self.apply_prefs() + if self.config.set('max_active_torrents') == 0: + 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)