Fix firing of Finished event when moving
This commit is contained in:
parent
64d06f5650
commit
1700b75cfe
|
@ -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))
|
||||||
|
|
Loading…
Reference in New Issue