tweak save_upmem

This commit is contained in:
Marcos Pinto 2007-11-09 22:32:18 +00:00
parent da9bf950a7
commit b645417689
2 changed files with 6 additions and 1 deletions

View File

@ -291,6 +291,10 @@ class Manager:
print "Saving fastresume data..."
self.save_fastresume_data()
# save upload memory
print "Saving uploaded memory..."
self.save_upmem()
# Shutdown torrent core
print "Quitting the core..."
deluge_core.quit()
@ -660,7 +664,6 @@ of HD space! Oops!\nWe had to pause at least one torrent"))
def prioritize_files(self, unique_ID, priorities, update_files_removed=False):
assert(len(priorities) == \
self.get_core_torrent_state(unique_ID)['num_files'])
self.unique_IDs[unique_ID].priorities = priorities[:]
deluge_core.prioritize_files(unique_ID, priorities)
if update_files_removed:

View File

@ -748,6 +748,7 @@ window, please enter your password"))
path = self.manager.unique_IDs[uid].filename
save_dir = self.manager.unique_IDs[uid].save_dir
trackerslist = self.manager.unique_IDs[uid].trackers
self.manager.save_upmem()
uploaded_memory = self.manager.unique_IDs[uid].uploaded_memory
priorities = self.manager.get_priorities(uid)
save_info = [path, save_dir, order, trackerslist, \
@ -766,6 +767,7 @@ window, please enter your password"))
if save_info[4]:
self.manager.unique_IDs[unique_ID].initial_uploaded_memory = \
save_info[4]
self.manager.save_upmem()
if save_info[3]:
try:
self.manager.replace_trackers(unique_ID, save_info[3])