Fix firing of Finished event when moving
This commit is contained in:
parent
c61c2d8c3a
commit
223c9319c7
|
@ -1027,7 +1027,7 @@ class TorrentManager(component.Component):
|
||||||
torrent.set_save_path(os.path.normpath(alert.handle.save_path()))
|
torrent.set_save_path(os.path.normpath(alert.handle.save_path()))
|
||||||
torrent.set_move_completed(False)
|
torrent.set_move_completed(False)
|
||||||
|
|
||||||
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))
|
||||||
|
@ -1041,7 +1041,7 @@ class TorrentManager(component.Component):
|
||||||
except (RuntimeError, KeyError):
|
except (RuntimeError, KeyError):
|
||||||
return
|
return
|
||||||
|
|
||||||
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