diff options
author | Marcos Pinto <markybob@dipconsultants.com> | 2007-11-20 01:21:22 +0000 |
---|---|---|
committer | Marcos Pinto <markybob@dipconsultants.com> | 2007-11-20 01:21:22 +0000 |
commit | 19ee80cfab866d55ebb66138a8d1f9a9501d0459 (patch) | |
tree | 537c16540f7370253d4819a742769a6e737707b6 | |
parent | 7b6ece4a2c42a429c4cb558ecc56e41848d26538 (diff) | |
download | deluge-19ee80cfab866d55ebb66138a8d1f9a9501d0459.tar.gz deluge-19ee80cfab866d55ebb66138a8d1f9a9501d0459.tar.bz2 deluge-19ee80cfab866d55ebb66138a8d1f9a9501d0459.zip |
pause torrent before fastresume save if in compact mode
-rw-r--r-- | src/core.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core.py b/src/core.py index b9a12ae42..3f536db4e 100644 --- a/src/core.py +++ b/src/core.py @@ -288,6 +288,10 @@ class Manager: # Stop DHT, if needed self.set_DHT(False) + if self.config.get("use_compact_storage"): + for unique_ID in self.unique_IDs.keys(): + self.pause(unique_ID) + # Save fastresume data print "Saving fastresume data..." self.save_fastresume_data() @@ -705,11 +709,8 @@ of HD space! Oops!\nWe had to pause at least one torrent")) def set_user_pause(self, unique_ID, new_value, enforce_queue=True): if self.config.get("max_active_torrents") == 0: - try: - self.config.set("max_active_torrents", \ - self.config.get("max_active_torrents_tmp")) - except: - pass + self.config.set("max_active_torrents", \ + self.config.get("max_active_torrents_tmp")) self.apply_prefs() self.unique_IDs[unique_ID].user_paused = new_value if enforce_queue: |