From f7c21fd87b4b6044cc4b08f9454cf3909b96ec91 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Mon, 27 Jun 2011 02:33:50 +0100 Subject: [PATCH] Fix #1246: Losing Labels upon restart --- ChangeLog | 3 +++ deluge/plugins/label/label/core.py | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3bd042c36..c06e57b39 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,6 +19,9 @@ === AutoAdd === * #1861: Fix AutoAdd Warning (column number is a boolean) +=== Label === + * #1246: Fix losing Labels upon restart + === Deluge 1.3.2 (24 May 2011) === ==== Core ==== * #1527: Fix Converting unicode to unicode error in move_storage diff --git a/deluge/plugins/label/label/core.py b/deluge/plugins/label/label/core.py index 70b8e3554..7b1ea6faf 100644 --- a/deluge/plugins/label/label/core.py +++ b/deluge/plugins/label/label/core.py @@ -110,7 +110,9 @@ class Core(CorePluginBase): self.clean_initial_config() - component.get("EventManager").register_event_handler("TorrentAddedEvent", self.post_torrent_add) + def on_session_started(): + component.get("EventManager").register_event_handler("TorrentAddedEvent", self.post_torrent_add) + component.get("EventManager").register_event_handler("SessionStartedEvent", on_session_started) component.get("EventManager").register_event_handler("TorrentRemovedEvent", self.post_torrent_remove) #register tree: