From c520e657cea52bf76ed732cf970ed3ed7d2a1c43 Mon Sep 17 00:00:00 2001 From: sledgehammer999 Date: Tue, 11 Sep 2018 21:00:04 +0300 Subject: [PATCH] Save state change from queued to paused --- src/base/bittorrent/torrenthandle.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/base/bittorrent/torrenthandle.cpp b/src/base/bittorrent/torrenthandle.cpp index 6e59612c2..c61e52f41 100644 --- a/src/base/bittorrent/torrenthandle.cpp +++ b/src/base/bittorrent/torrenthandle.cpp @@ -1347,6 +1347,12 @@ void TorrentHandle::pause() m_nativeHandle.auto_managed(false); m_nativeHandle.pause(); + + // Libtorrent doesn't emit a torrent_paused_alert when the + // torrent is queued (no I/O) + // We test on the cached m_nativeStatus + if (isQueued()) + m_session->handleTorrentPaused(this); } void TorrentHandle::resume(bool forced)