From eb05a47d6a1ee771e9d8f13f717b8cf926c6b523 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Sat, 28 Feb 2009 22:07:49 +0000 Subject: [PATCH] Only emit the TorrentFinished event when the torrent hasn't been previously finished.. e.g. after a force recheck --- deluge/core/torrentmanager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deluge/core/torrentmanager.py b/deluge/core/torrentmanager.py index 34e42e34f..c08ebc3d4 100644 --- a/deluge/core/torrentmanager.py +++ b/deluge/core/torrentmanager.py @@ -634,11 +634,11 @@ class TorrentManager(component.Component): if move_path: if torrent.options["download_location"] != move_path: torrent.move_storage(move_path) + torrent.is_finished = True + component.get("EventManager").emit(TorrentFinishedEvent(torrent_id)) - torrent.is_finished = True torrent.update_state() torrent.save_resume_data() - component.get("EventManager").emit(TorrentFinishedEvent(torrent_id)) def on_alert_torrent_paused(self, alert): log.debug("on_alert_torrent_paused")