fix a bug in the execute plugin when move_completed is used the incorrect path was passed in

This commit is contained in:
Damien Churchill 2009-12-08 11:24:56 +00:00
parent 5129682727
commit d119fa3629
1 changed files with 7 additions and 2 deletions

View File

@ -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])