diff options
author | Damien Churchill <damoc@gmail.com> | 2009-12-08 11:24:56 +0000 |
---|---|---|
committer | Damien Churchill <damoc@gmail.com> | 2009-12-08 11:24:56 +0000 |
commit | 36b2a8256102133566675278b73beab8afe6d507 (patch) | |
tree | 56df9eb32579be6af5892bdbfa76fc2f1f10166b | |
parent | f5096c6e7c7e397c86554538c9ad0f881e762e9c (diff) | |
download | deluge-36b2a8256102133566675278b73beab8afe6d507.tar.gz deluge-36b2a8256102133566675278b73beab8afe6d507.tar.bz2 deluge-36b2a8256102133566675278b73beab8afe6d507.zip |
fix a bug in the execute plugin when move_completed is used the incorrect path was passed in
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | deluge/plugins/execute/execute/core.py | 9 |
2 files changed, 10 insertions, 2 deletions
@@ -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 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]) |