mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 11:35:49 +00:00
Fix possible TorrentFinishedEvents being emitted on startup for already completed torrents
This commit is contained in:
parent
6a8e023ffd
commit
fa79c37aa2
1 changed files with 2 additions and 2 deletions
|
@ -785,10 +785,10 @@ class TorrentManager(component.Component):
|
|||
total_download = torrent.get_status(["total_payload_download"])["total_payload_download"]
|
||||
|
||||
# Move completed download to completed folder if needed
|
||||
if not torrent.is_finished:
|
||||
if not torrent.is_finished and total_download:
|
||||
move_path = None
|
||||
|
||||
if torrent.options["move_completed"] and total_download:
|
||||
if torrent.options["move_completed"]:
|
||||
move_path = torrent.options["move_completed_path"]
|
||||
if torrent.options["download_location"] != move_path:
|
||||
torrent.move_storage(move_path)
|
||||
|
|
Loading…
Add table
Reference in a new issue