Fix #1477: Execute Plugin should ignore Added events from state file on startup
This commit is contained in:
parent
7e51c82705
commit
e7b5be6a60
|
@ -76,6 +76,7 @@ class Core(CorePluginBase):
|
||||||
def enable(self):
|
def enable(self):
|
||||||
self.config = ConfigManager("execute.conf", DEFAULT_CONFIG)
|
self.config = ConfigManager("execute.conf", DEFAULT_CONFIG)
|
||||||
event_manager = component.get("EventManager")
|
event_manager = component.get("EventManager")
|
||||||
|
self.torrent_manager = component.get("TorrentManager")
|
||||||
self.registered_events = {}
|
self.registered_events = {}
|
||||||
|
|
||||||
# Go through the commands list and register event handlers
|
# Go through the commands list and register event handlers
|
||||||
|
@ -102,6 +103,8 @@ class Core(CorePluginBase):
|
||||||
torrent_name = info["name"]
|
torrent_name = info["name"]
|
||||||
if event == "complete":
|
if event == "complete":
|
||||||
save_path = info["move_on_completed_path"] if info ["move_on_completed"] else info["save_path"]
|
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:
|
else:
|
||||||
save_path = info["save_path"]
|
save_path = info["save_path"]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue