Author: damoxc
Revision: 5991
Log:
fix a bug in the execute plugin when move_completed is used the
incorrect path was passed in
Diff:
Modified: branches/1.2_RC/ChangeLog
===================================================================
--- branches/1.2_RC/ChangeLog 2009-12-08 02:09:03 UTC (rev 5990)
+++ branches/1.2_RC/ChangeLog 2009-12-08 11:24:56 UTC (rev 5991)
@@ -13,6 +13,9 @@
==== Label ====
* Fix #1085 only use ints for specific options to prevent unhandled
exception
+==== Execute ====
+ * Use the move_completed path if it is different to the save path in
the completed event.
+
=== Deluge 1.2.0_rc4 (24 November 2009) ===
==== Core ====
* Fix deleting old .fastresume files with fresh configs
Modified: branches/1.2_RC/deluge/plugins/execute/execute/core.py
===================================================================
--- branches/1.2_RC/deluge/plugins/execute/execute/core.py 2009-12-08
02:09:03 UTC (rev 5990)
+++ branches/1.2_RC/deluge/plugins/execute/execute/core.py 2009-12-08
11:24:56 UTC (rev 5991)
@@ -78,9 +78,14 @@
def execute_commands(self, torrent_id, event):
torrent = component.get("TorrentManager").torrents[torrent_id]
- info = torrent.get_status(["name", "save_path"])
+ info = torrent.get_status(["name", "save_path",
+ "move_on_completed_path"])
+
torrent_name = info["name"]
- path = info["save_path"]
+ path = info["save_path"] if \
+ info["move_on_completed_path"] == info["save_path"] else \
+ info["move_on_completed_path"]
+
for command in self.config["commands"]:
if command[EXECUTE_EVENT] == event:
command = os.path.expandvars(command[EXECUTE_COMMAND])
Modified: trunk/deluge/plugins/execute/execute/core.py
===================================================================
--- trunk/deluge/plugins/execute/execute/core.py 2009-12-08 02:09:03 UTC
(rev 5990)
+++ trunk/deluge/plugins/execute/execute/core.py 2009-12-08 11:24:56 UTC
(rev 5991)
@@ -78,9 +78,14 @@
def execute_commands(self, torrent_id, event):
torrent = component.get("TorrentManager").torrents[torrent_id]
- info = torrent.get_status(["name", "save_path"])
+ info = torrent.get_status(["name", "save_path",
+ "move_on_completed_path"])
+
torrent_name = info["name"]
- path = info["save_path"]
+ path = info["save_path"] if \
+ info["move_on_completed_path"] == info["save_path"] else \
+ info["move_on_completed_path"]
+
for command in self.config["commands"]:
if command[EXECUTE_EVENT] == event:
command = os.path.expandvars(command[EXECUTE_COMMAND])
--
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.