Module: deluge Branch: 1.3-stable Commit: e7b5be6a6053b832ecac6a65d76950eb89e24067
Author: Calum Lind <[email protected]> Date: Thu Jun 30 13:05:18 2011 +0100 Fix #1477: Execute Plugin should ignore Added events from state file on startup --- deluge/plugins/execute/execute/core.py | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/deluge/plugins/execute/execute/core.py b/deluge/plugins/execute/execute/core.py index 4c5e660..52bfbc5 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"] -- 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.
