mirror of
https://github.com/codex-storage/deluge.git
synced 2025-03-01 11:30:43 +00:00
Fix execute plugin only executing last event (#1306)
This commit is contained in:
parent
bd775d0d40
commit
4d2b7df49d
@ -2,6 +2,9 @@
|
|||||||
==== ConsoleUI ====
|
==== ConsoleUI ====
|
||||||
* #1307: Fix not being able to add torrents
|
* #1307: Fix not being able to add torrents
|
||||||
|
|
||||||
|
==== Execute ====
|
||||||
|
* #1306: Fix always executing last event
|
||||||
|
|
||||||
=== Deluge 1.3.0-rc1 (08 May 2010) ===
|
=== Deluge 1.3.0-rc1 (08 May 2010) ===
|
||||||
==== Core ====
|
==== Core ====
|
||||||
* Implement #1063 option to delete torrent file copy on torrent removal - patch from Ghent
|
* Implement #1063 option to delete torrent file copy on torrent removal - patch from Ghent
|
||||||
|
@ -84,8 +84,11 @@ class Core(CorePluginBase):
|
|||||||
if event in self.registered_events:
|
if event in self.registered_events:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
def event_handler(torrent_id):
|
def create_event_handler(event):
|
||||||
self.execute_commands(torrent_id, command[EXECUTE_EVENT])
|
def event_handler(torrent_id):
|
||||||
|
self.execute_commands(torrent_id, event)
|
||||||
|
return event_handler
|
||||||
|
event_handler = create_event_handler(event)
|
||||||
event_manager.register_event_handler(EVENT_MAP[event], event_handler)
|
event_manager.register_event_handler(EVENT_MAP[event], event_handler)
|
||||||
self.registered_events[event] = event_handler
|
self.registered_events[event] = event_handler
|
||||||
|
|
||||||
@ -102,7 +105,7 @@ class Core(CorePluginBase):
|
|||||||
else:
|
else:
|
||||||
save_path = info["save_path"]
|
save_path = info["save_path"]
|
||||||
|
|
||||||
log.debug("[execute] Running commands for %s", EXECUTE_EVENT)
|
log.debug("[execute] Running commands for %s", event)
|
||||||
|
|
||||||
# Go through and execute all the commands
|
# Go through and execute all the commands
|
||||||
for command in self.config["commands"]:
|
for command in self.config["commands"]:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user