Author: andar
Revision: 5363
Log:
Only move a torrent due to 'move on complete' when some data has been
downloaded
Diff:
Modified: branches/1.1.0_RC/ChangeLog
===================================================================
--- branches/1.1.0_RC/ChangeLog 2009-06-08 21:57:02 UTC (rev 5362)
+++ branches/1.1.0_RC/ChangeLog 2009-06-09 00:35:43 UTC (rev 5363)
@@ -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
Modified: branches/1.1.0_RC/deluge/core/torrentmanager.py
===================================================================
--- branches/1.1.0_RC/deluge/core/torrentmanager.py 2009-06-08 21:57:02 UTC
(rev 5362)
+++ branches/1.1.0_RC/deluge/core/torrentmanager.py 2009-06-09 00:35:43 UTC
(rev 5363)
@@ -647,7 +647,10 @@
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
Modified: trunk/deluge/core/torrentmanager.py
===================================================================
--- trunk/deluge/core/torrentmanager.py 2009-06-08 21:57:02 UTC (rev 5362)
+++ trunk/deluge/core/torrentmanager.py 2009-06-09 00:35:43 UTC (rev 5363)
@@ -658,7 +658,11 @@
# Move completed download to completed folder if needed
if not torrent.is_finished:
move_path = None
- if torrent.options["move_completed"]:
+ # 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 torrent.options["move_completed"] and total_download:
move_path = torrent.options["move_completed_path"]
if torrent.options["download_location"] != move_path and \
torrent.options["download_location"] ==
self.config["download_location"]:
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---