Module: deluge Branch: master Commit: 3b5e70580e7e4532de8fb8d9765be647ccc74412
Author: Calum Lind <[email protected]> Date: Mon Jun 27 22:50:21 2011 +0100 Fix from_state in TorrentAddedEvent --- deluge/core/torrentmanager.py | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/deluge/core/torrentmanager.py b/deluge/core/torrentmanager.py index 014bfad..a3b8ca6 100644 --- a/deluge/core/torrentmanager.py +++ b/deluge/core/torrentmanager.py @@ -509,16 +509,14 @@ class TorrentManager(component.Component): self.save_state() # Emit torrent_added signal - from_state = False - if torrent_info and state is None: - from_state = True + from_state = state is not None component.get("EventManager").emit( TorrentAddedEvent(torrent.torrent_id, from_state) ) log.info("Torrent %s from user \"%s\" %s", torrent.get_status(["name"])["name"], torrent.get_status(["owner"])["owner"], - (from_state and "added" or "loaded")) + (from_state and "loaded" or "added")) return torrent.torrent_id def load_torrent(self, torrent_id): -- 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.
