summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcos Pinto <markybob@dipconsultants.com>2007-11-19 00:27:56 +0000
committerMarcos Pinto <markybob@dipconsultants.com>2007-11-19 00:27:56 +0000
commit34e0a0e8390b3c56cd7c801e46e7551c2ea0cad8 (patch)
tree9d1198c1ec8fb832fc986e320c3d38f8fc387ff1
parent1c369bce31a37dd5f1be5f1d768c17c688fd1ea1 (diff)
downloaddeluge-34e0a0e8390b3c56cd7c801e46e7551c2ea0cad8.tar.gz
deluge-34e0a0e8390b3c56cd7c801e46e7551c2ea0cad8.tar.bz2
deluge-34e0a0e8390b3c56cd7c801e46e7551c2ea0cad8.zip
tweak pause/resume all
-rw-r--r--src/core.py16
1 files changed, 9 insertions, 7 deletions
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)