Skip to content

Commit

Permalink
Fix state not loading after async API change
Browse files Browse the repository at this point in the history
  • Loading branch information
cas-- committed Dec 16, 2017
1 parent 07a87fa commit c13622a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions deluge/core/torrentmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,8 +675,14 @@ def load_state(self):
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:
Expand Down

0 comments on commit c13622a

Please sign in to comment.