tweaks to last commit
This commit is contained in:
parent
4238ac91a3
commit
91b6f6b26f
16
src/core.py
16
src/core.py
|
@ -394,8 +394,18 @@ class Manager:
|
|||
def save_fastresume_data(self, uid=None):
|
||||
if uid == None:
|
||||
for unique_ID in self.unique_IDs:
|
||||
import common
|
||||
try:
|
||||
os.remove(os.path.join(common.CONFIG_DIR, torrentfiles, self.unique_IDs[unique_ID].filename + '.fastresume'))
|
||||
except:
|
||||
pass
|
||||
deluge_core.save_fastresume(unique_ID, self.unique_IDs[unique_ID].filename)
|
||||
else:
|
||||
import common
|
||||
try:
|
||||
os.remove(os.path.join(common.CONFIG_DIR, torrentfiles, self.unique_IDs[unique_ID].filename + '.fastresume'))
|
||||
except:
|
||||
pass
|
||||
deluge_core.save_fastresume(uid, self.unique_IDs[uid].filename)
|
||||
|
||||
# Load all NEW torrents in a directory. The GUI can call this every minute or so,
|
||||
|
@ -628,12 +638,6 @@ class Manager:
|
|||
|
||||
# save fast resume once torrent finishes so as to not recheck
|
||||
# seed if client crashes
|
||||
# remove existing fastresume first to prevent "losing" data
|
||||
import common
|
||||
try:
|
||||
os.remove(os.path.join(common.CONFIG_DIR, torrentfiles, self.unique_IDs[unique_ID].filename + '.fastresume'))
|
||||
except:
|
||||
pass
|
||||
self.save_fastresume_data(event['unique_ID'])
|
||||
|
||||
elif event['event_type'] is self.constants['EVENT_TRACKER_ANNOUNCE']:
|
||||
|
|
Loading…
Reference in New Issue