mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-04 15:38:43 +00:00
Fix #2303 : Torrent state not updated until after emitting TorrentFinishedEvent
This commit is contained in:
parent
686fb31844
commit
5057e2caab
1 changed files with 5 additions and 3 deletions
|
@ -896,10 +896,12 @@ class TorrentManager(component.Component):
|
||||||
if torrent.options["download_location"] != move_path:
|
if torrent.options["download_location"] != move_path:
|
||||||
torrent.move_storage(move_path)
|
torrent.move_storage(move_path)
|
||||||
|
|
||||||
component.get("EventManager").emit(TorrentFinishedEvent(torrent_id))
|
|
||||||
|
|
||||||
torrent.is_finished = True
|
|
||||||
torrent.update_state()
|
torrent.update_state()
|
||||||
|
if not torrent.is_finished and total_download:
|
||||||
|
torrent.is_finished = True
|
||||||
|
component.get("EventManager").emit(TorrentFinishedEvent(torrent_id))
|
||||||
|
else:
|
||||||
|
torrent.is_finished = True
|
||||||
|
|
||||||
# Torrent is no longer part of the queue
|
# Torrent is no longer part of the queue
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue