From e7b5be6a6053b832ecac6a65d76950eb89e24067 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Thu, 30 Jun 2011 13:05:18 +0100 Subject: [PATCH] Fix #1477: Execute Plugin should ignore Added events from state file on startup --- deluge/plugins/execute/execute/core.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/deluge/plugins/execute/execute/core.py b/deluge/plugins/execute/execute/core.py index 4c5e66005..52bfbc55f 100644 --- a/deluge/plugins/execute/execute/core.py +++ b/deluge/plugins/execute/execute/core.py @@ -76,6 +76,7 @@ class Core(CorePluginBase): def enable(self): self.config = ConfigManager("execute.conf", DEFAULT_CONFIG) event_manager = component.get("EventManager") + self.torrent_manager = component.get("TorrentManager") self.registered_events = {} # Go through the commands list and register event handlers @@ -102,6 +103,8 @@ class Core(CorePluginBase): torrent_name = info["name"] if event == "complete": save_path = info["move_on_completed_path"] if info ["move_on_completed"] else info["save_path"] + elif event == "added" and not self.torrent_manager.session_started: + return else: save_path = info["save_path"]