tweak pause/resume all

This commit is contained in:
Marcos Pinto 2007-11-19 00:27:56 +00:00
parent 1c369bce31
commit 34e0a0e839
1 changed files with 9 additions and 7 deletions

View File

@ -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)