Fix firing of Finished event when moving

This commit is contained in:
Calum Lind 2014-08-16 22:49:13 +01:00
parent 64d06f5650
commit 1700b75cfe
1 changed files with 2 additions and 2 deletions

View File

@ -1040,7 +1040,7 @@ class TorrentManager(component.Component):
torrent.moving_storage = False torrent.moving_storage = False
torrent.update_state() 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) self.waiting_on_finish_moving.remove(torrent_id)
torrent.is_finished = True torrent.is_finished = True
component.get("EventManager").emit(TorrentFinishedEvent(torrent_id)) component.get("EventManager").emit(TorrentFinishedEvent(torrent_id))
@ -1060,7 +1060,7 @@ class TorrentManager(component.Component):
torrent.pause() torrent.pause()
torrent.update_state() 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) self.waiting_on_finish_moving.remove(torrent_id)
torrent.is_finished = True torrent.is_finished = True
component.get("EventManager").emit(TorrentFinishedEvent(torrent_id)) component.get("EventManager").emit(TorrentFinishedEvent(torrent_id))