diff --git a/deluge/core/torrentmanager.py b/deluge/core/torrentmanager.py index fe8f20154..20c5d46c8 100644 --- a/deluge/core/torrentmanager.py +++ b/deluge/core/torrentmanager.py @@ -528,7 +528,9 @@ class TorrentManager(component.Component): def save_resume_data(self): """Saves resume data for all the torrents""" for torrent in self.torrents.values(): - torrent.write_fastresume() + if not torrent.is_finished: + torrent.delete_fastresume() + torrent.write_fastresume() def queue_top(self, torrent_id): """Queue torrent to top""" @@ -616,7 +618,9 @@ class TorrentManager(component.Component): component.get("SignalManager").emit("torrent_paused", torrent_id) # Write the fastresume file - self.torrents[torrent_id].write_fastresume() + 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: self.shutdown_torrent_pause_list.remove(torrent_id)