mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-04 15:38:43 +00:00
Save resume data periodically
This commit is contained in:
parent
897ef1135d
commit
da309c66c3
2 changed files with 7 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
Deluge 0.9.05 - "1.0.0_RC5" (In Development)
|
Deluge 0.9.05 - "1.0.0_RC5" (In Development)
|
||||||
Core:
|
Core:
|
||||||
* Fix deluged running with ssh X forwarding by removing the Gnome lib import
|
* Fix deluged running with ssh X forwarding by removing the Gnome lib import
|
||||||
|
* Save resume data periodically to help prevent data loss
|
||||||
|
|
||||||
Plugins:
|
Plugins:
|
||||||
* Improve the Blocklist plugin preferences page.
|
* Improve the Blocklist plugin preferences page.
|
||||||
|
|
|
@ -162,6 +162,7 @@ class TorrentManager(component.Component):
|
||||||
|
|
||||||
# Save the state every 5 minutes
|
# Save the state every 5 minutes
|
||||||
self.save_state_timer = gobject.timeout_add(300000, self.save_state)
|
self.save_state_timer = gobject.timeout_add(300000, self.save_state)
|
||||||
|
self.save_resume_data_timer = gobject.timeout_add(290000, self.save_resume_data)
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
# Save state on shutdown
|
# Save state on shutdown
|
||||||
|
@ -552,6 +553,11 @@ class TorrentManager(component.Component):
|
||||||
# We return True so that the timer thread will continue
|
# We return True so that the timer thread will continue
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
def save_resume_data(self):
|
||||||
|
"""Saves resume data for all the torrents"""
|
||||||
|
for torrent in self.torrents.values():
|
||||||
|
torrent.write_fastresume()
|
||||||
|
|
||||||
def queue_top(self, torrent_id):
|
def queue_top(self, torrent_id):
|
||||||
"""Queue torrent to top"""
|
"""Queue torrent to top"""
|
||||||
if self.torrents[torrent_id].get_queue_position() == 0:
|
if self.torrents[torrent_id].get_queue_position() == 0:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue