Only move a torrent due to 'move on complete' when some data has been downloaded

This commit is contained in:
Andrew Resch 2009-06-09 00:35:43 +00:00
parent dc7fcddecd
commit 4760b77ab8
2 changed files with 7 additions and 1 deletions

View file

@ -1,4 +1,7 @@
=== Deluge 1.1.9 - (In Development) ===
==== Core ====
* Only move a torrent due to 'move on complete' when some data has been downloaded
==== GtkUI ====
* Fix #950 renaming a parent folder into multiple folders

View file

@ -647,7 +647,10 @@ class TorrentManager(component.Component):
move_path = torrent.options["move_completed_path"]
elif self.config["move_completed"]:
move_path = self.config["move_completed_path"]
if move_path:
# Get the total_download and if it's 0, do not move.. It's likely
# that the torrent wasn't downloaded, but just added.
total_download = torrent.get_status(["total_payload_download"])["total_payload_download"]
if move_path and total_download:
if torrent.options["download_location"] != move_path:
torrent.move_storage(move_path)
torrent.is_finished = True