dont resave fastresume for seeds

This commit is contained in:
Marcos Pinto 2008-02-10 07:42:01 +00:00
parent 1f881a3d9c
commit d4d1ccac33
1 changed files with 13 additions and 11 deletions

View File

@ -459,6 +459,7 @@ class Manager:
def save_fastresume_data(self, uid=None): def save_fastresume_data(self, uid=None):
if uid == None: if uid == None:
for unique_ID in self.unique_IDs: for unique_ID in self.unique_IDs:
if not self.get_core_torrent_state(unique_ID, True)['is_seed']:
try: try:
os.remove(self.unique_IDs[unique_ID].filename + ".fastresume") os.remove(self.unique_IDs[unique_ID].filename + ".fastresume")
except: except:
@ -468,6 +469,7 @@ class Manager:
except Exception, e: except Exception, e:
print "Unable to save fastresume: ", e print "Unable to save fastresume: ", e
else: else:
if not self.get_core_torrent_state(uid, True)['is_seed']:
try: try:
os.remove(self.unique_IDs[uid].filename + ".fastresume") os.remove(self.unique_IDs[uid].filename + ".fastresume")
except: except: