From 4760b77ab844b29e6c5a296b9e8184550b20ccc2 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Tue, 9 Jun 2009 00:35:43 +0000 Subject: [PATCH] Only move a torrent due to 'move on complete' when some data has been downloaded --- ChangeLog | 3 +++ deluge/core/torrentmanager.py | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 622dbd203..424a7d62c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/deluge/core/torrentmanager.py b/deluge/core/torrentmanager.py index 30908955b..07996c275 100644 --- a/deluge/core/torrentmanager.py +++ b/deluge/core/torrentmanager.py @@ -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