mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-14 05:26:28 +00:00
Attempt fix fastresume saving issue.
This commit is contained in:
parent
b59d148a21
commit
bff0e3f8d5
@ -733,6 +733,10 @@ Space:") + " " + nice_free)
|
||||
for callback in self.event_callbacks[event['event_type']]:
|
||||
callback(event)
|
||||
|
||||
if event['event_type'] is self.constants['EVENT_TORRENT_PAUSED'] or \
|
||||
event['event_type'] is self.constants['EVENT_FINISHED_CHECKING']:
|
||||
self.save_fastresume_data(event['unique_ID'])
|
||||
|
||||
if event['event_type'] is self.constants['EVENT_FINISHED']:
|
||||
if event['message'] == "torrent has finished downloading":
|
||||
|
||||
|
@ -833,6 +833,7 @@ window, please enter your password"))
|
||||
torrent_state = self.manager.get_torrent_state(uid)
|
||||
if torrent_state["is_paused"]:
|
||||
try:
|
||||
if torrent_state["state"] != 6 or torrent_state["state"] != 7:
|
||||
os.remove(self.manager.unique_IDs[uid].filename + ".fastresume")
|
||||
except:
|
||||
pass
|
||||
@ -849,8 +850,6 @@ window, please enter your password"))
|
||||
for uid in unique_ids:
|
||||
self.manager.set_user_pause(uid, True, True)
|
||||
torrent_state = self.manager.get_torrent_state(uid)
|
||||
if torrent_state["is_paused"] == 0:
|
||||
self.manager.save_fastresume_data(uid)
|
||||
self.update()
|
||||
except:
|
||||
pass
|
||||
|
Loading…
x
Reference in New Issue
Block a user