mirror of
https://github.com/logos-storage/deluge.git
synced 2026-01-22 15:03:11 +00:00
Fix #2303 : Torrent state not updated until after emitting TorrentFinishedEvent
This commit is contained in:
parent
686fb31844
commit
5057e2caab
@ -896,10 +896,12 @@ class TorrentManager(component.Component):
|
||||
if torrent.options["download_location"] != move_path:
|
||||
torrent.move_storage(move_path)
|
||||
|
||||
component.get("EventManager").emit(TorrentFinishedEvent(torrent_id))
|
||||
|
||||
torrent.is_finished = True
|
||||
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
|
||||
try:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user