From 1700b75cfec3a8e0322e2f512a793d15961bed2f Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Sat, 16 Aug 2014 22:49:13 +0100 Subject: [PATCH] Fix firing of Finished event when moving --- 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 1fa374c68..a605778bc 100644 --- a/deluge/core/torrentmanager.py +++ b/deluge/core/torrentmanager.py @@ -1040,7 +1040,7 @@ class TorrentManager(component.Component): torrent.moving_storage = False torrent.update_state() - if torrent in self.waiting_on_finish_moving: + if torrent_id in self.waiting_on_finish_moving: self.waiting_on_finish_moving.remove(torrent_id) torrent.is_finished = True component.get("EventManager").emit(TorrentFinishedEvent(torrent_id)) @@ -1060,7 +1060,7 @@ class TorrentManager(component.Component): torrent.pause() torrent.update_state() - if torrent in self.waiting_on_finish_moving: + if torrent_id in self.waiting_on_finish_moving: self.waiting_on_finish_moving.remove(torrent_id) torrent.is_finished = True component.get("EventManager").emit(TorrentFinishedEvent(torrent_id))