diff --git a/deluge/core/core.py b/deluge/core/core.py index d51a17eb0..c14af338d 100644 --- a/deluge/core/core.py +++ b/deluge/core/core.py @@ -458,6 +458,8 @@ class Core(component.Component): """Resume all torrents in the session""" if self.session.is_paused(): self.session.resume() + for torrent_id in self.torrentmanager.torrents: + self.torrentmanager[torrent_id].update_state() component.get("EventManager").emit(SessionResumedEvent()) @export diff --git a/deluge/core/torrentmanager.py b/deluge/core/torrentmanager.py index e996923c7..f276529ea 100644 --- a/deluge/core/torrentmanager.py +++ b/deluge/core/torrentmanager.py @@ -582,9 +582,12 @@ class TorrentManager(component.Component): state = TorrentManagerState() # Create the state for each Torrent and append to the list for torrent in self.torrents.values(): - paused = False - if torrent.state in ["Paused", "Error"]: + if self.session.is_paused(): + paused = torrent.handle.is_paused() + elif torrent.state in ["Paused", "Error"]: paused = True + else: + paused = False torrent_state = TorrentState( torrent.torrent_id, diff --git a/deluge/plugins/Scheduler/deluge/plugins/scheduler/core.py b/deluge/plugins/Scheduler/deluge/plugins/scheduler/core.py index a69eec7a5..c6e1aa132 100644 --- a/deluge/plugins/Scheduler/deluge/plugins/scheduler/core.py +++ b/deluge/plugins/Scheduler/deluge/plugins/scheduler/core.py @@ -107,7 +107,7 @@ class Core(CorePluginBase): for setting in CONTROLLED_SETTINGS: component.get("PreferencesManager").do_config_set_func(setting, core_config[setting]) # Resume the session if necessary - component.get("Core").session.resume() + component.get("Core").resume_session() def do_schedule(self, timer=True): """