diff --git a/deluge/core/core.py b/deluge/core/core.py index 08e2cc7d6..993b21972 100644 --- a/deluge/core/core.py +++ b/deluge/core/core.py @@ -52,6 +52,7 @@ from deluge.core.torrentmanager import TorrentManager from deluge.core.pluginmanager import PluginManager from deluge.core.alertmanager import AlertManager from deluge.core.signalmanager import SignalManager +from deluge.core.autoadd import AutoAdd from deluge.log import LOG as log DEFAULT_PREFS = { @@ -244,6 +245,9 @@ class Core( # Start the TorrentManager self.torrents = TorrentManager(self.session, self.alerts) + # Create the AutoAdd component + self.autoadd = AutoAdd() + component.start() t = threading.Thread(target=self.serve_forever) diff --git a/deluge/core/torrentmanager.py b/deluge/core/torrentmanager.py index 6c4cd4bac..fae8f4e81 100644 --- a/deluge/core/torrentmanager.py +++ b/deluge/core/torrentmanager.py @@ -46,7 +46,7 @@ import deluge.component as component from deluge.core.torrentqueue import TorrentQueue from deluge.configmanager import ConfigManager from deluge.core.torrent import Torrent -from deluge.core.autoadd import AutoAdd + from deluge.log import LOG as log class TorrentState: @@ -140,15 +140,12 @@ class TorrentManager(component.Component): self.on_alert_storage_moved) self.alerts.register_handler("file_error_alert", self.on_alert_file_error) - # Create the AutoAdd component - self.autoadd = AutoAdd() - def start(self): # Get the pluginmanager reference self.plugins = component.get("PluginManager") self.signals = component.get("SignalManager") - + # Try to load the state from file self.load_state() @@ -633,7 +630,6 @@ class TorrentManager(component.Component): # Get the torrent_id torrent_id = str(alert.handle.info_hash()) # Set the torrent state - log.debug("self.torrents: %s", self.torrents) if not self.torrents[torrent_id].handle.is_paused(): if self.torrents[torrent_id].handle.is_seed(): self.torrents[torrent_id].set_state("Seeding")