From d119fa36291923a82b0df0cd08333a6b056f4bd7 Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Tue, 8 Dec 2009 11:24:56 +0000 Subject: [PATCH] fix a bug in the execute plugin when move_completed is used the incorrect path was passed in --- deluge/plugins/execute/execute/core.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/deluge/plugins/execute/execute/core.py b/deluge/plugins/execute/execute/core.py index ef4c6f6f2..96565207d 100644 --- a/deluge/plugins/execute/execute/core.py +++ b/deluge/plugins/execute/execute/core.py @@ -78,9 +78,14 @@ class Core(CorePluginBase): 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])