From c13622a1e6dac394bde235197b113780f05443ac Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Sat, 16 Dec 2017 13:20:04 +0000 Subject: [PATCH] Fix state not loading after async API change --- deluge/core/torrentmanager.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/deluge/core/torrentmanager.py b/deluge/core/torrentmanager.py index 877b1058b..9739ad556 100644 --- a/deluge/core/torrentmanager.py +++ b/deluge/core/torrentmanager.py @@ -675,8 +675,14 @@ class TorrentManager(component.Component): magnet = None try: - d = self.add(torrent_info=torrent_info, state=t_state, options=options, save_state=False, - magnet=magnet, resume_data=resume_data.get(t_state.torrent_id)) + d = self.add_async( + torrent_info=torrent_info, + state=t_state, + options=options, + save_state=False, + magnet=magnet, + resume_data=resume_data.get(t_state.torrent_id), + ) except AddTorrentError as ex: log.warn('Error when adding torrent "%s" to session: %s', t_state.torrent_id, ex) else: