From 1da24fbeaafef67fa72cd5f622fc599172a20ba4 Mon Sep 17 00:00:00 2001 From: Asmageddon Date: Fri, 1 Jun 2012 21:53:12 +0200 Subject: [PATCH] Updated some event handlers --- deluge/ui/console/modes/legacy.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deluge/ui/console/modes/legacy.py b/deluge/ui/console/modes/legacy.py index dfe65e0fe..d8e4602d8 100644 --- a/deluge/ui/console/modes/legacy.py +++ b/deluge/ui/console/modes/legacy.py @@ -973,12 +973,12 @@ class Legacy(BaseMode, component.Component): return ret - def on_torrent_added_event(self, event): + def on_torrent_added_event(self, event, from_state=False): def on_torrent_status(status): - self.torrents.append((event.torrent_id, status["name"])) - client.core.get_torrent_status(event.torrent_id, ["name"]).addCallback(on_torrent_status) + self.torrents.append((event, status["name"])) + client.core.get_torrent_status(event, ["name"]).addCallback(on_torrent_status) def on_torrent_removed_event(self, event): for index, (tid, name) in enumerate(self.torrents): - if event.torrent_id == tid: + if event == tid: del self.torrents[index]