fix problem with old fastresume files not being replaced causing loss of data and dont resave fastresume for seed files
This commit is contained in:
parent
2cd39233da
commit
deb00e332e
|
@ -528,6 +528,8 @@ class TorrentManager(component.Component):
|
|||
def save_resume_data(self):
|
||||
"""Saves resume data for all the torrents"""
|
||||
for torrent in self.torrents.values():
|
||||
if not torrent.is_finished:
|
||||
torrent.delete_fastresume()
|
||||
torrent.write_fastresume()
|
||||
|
||||
def queue_top(self, torrent_id):
|
||||
|
@ -616,6 +618,8 @@ class TorrentManager(component.Component):
|
|||
component.get("SignalManager").emit("torrent_paused", torrent_id)
|
||||
|
||||
# Write the fastresume file
|
||||
if not self.torrents[torrent_id].is_finished:
|
||||
self.torrents[torrent_id].delete_fastresume()
|
||||
self.torrents[torrent_id].write_fastresume()
|
||||
|
||||
if torrent_id in self.shutdown_torrent_pause_list:
|
||||
|
|
Loading…
Reference in New Issue