Module: deluge Branch: 1.3-stable Commit: d6e619c41313638467a16eabb82a9fd00d33c3b7
Author: Calum Lind <[email protected]> Date: Thu Jun 30 22:33:19 2011 +0100 Add session_started to determine if TorrentAddedEvent is from state file --- deluge/core/torrentmanager.py | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/deluge/core/torrentmanager.py b/deluge/core/torrentmanager.py index cd55048..a13c9dc 100644 --- a/deluge/core/torrentmanager.py +++ b/deluge/core/torrentmanager.py @@ -149,6 +149,9 @@ class TorrentManager(component.Component): # Keeps track of resume data that needs to be saved to disk self.resume_data = {} + + # Workaround to determine if TorrentAddedEvent is from state file + self.session_started = False # Register set functions self.config.register_set_function("max_connections_per_torrent", @@ -631,6 +634,7 @@ class TorrentManager(component.Component): log.error("Torrent state file is either corrupt or incompatible! %s", e) break + self.session_started = True component.get("EventManager").emit(SessionStartedEvent()) def save_state(self): -- 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.
