Improve force recheck of paused torrent

This commit is contained in:
Vladimir Golovnev (Glassez) 2018-09-23 12:29:50 +03:00
parent a8c00456e4
commit 9dadb919ef
No known key found for this signature in database
GPG Key ID: 52A2C7DEE2DFA6F7
2 changed files with 1 additions and 10 deletions

View File

@ -191,7 +191,6 @@ TorrentHandle::TorrentHandle(Session *session, const libtorrent::torrent_handle
, m_hasRootFolder(params.hasRootFolder)
, m_needsToSetFirstLastPiecePriority(false)
, m_needsToStartForced(params.forced)
, m_pauseAfterRecheck(false)
{
if (m_useAutoTMM)
m_savePath = Utils::Fs::toNativePath(m_session->categorySavePath(m_category));
@ -1275,11 +1274,9 @@ void TorrentHandle::forceRecheck()
m_unchecked = false;
if (isPaused()) {
m_pauseAfterRecheck = true;
m_nativeHandle.stop_when_ready(true);
resume_impl(true, true);
}
m_nativeHandle.force_recheck();
}
void TorrentHandle::setSequentialDownload(bool b)
@ -1587,11 +1584,6 @@ void TorrentHandle::handleTorrentCheckedAlert(const libtorrent::torrent_checked_
adjustActualSavePath();
manageIncompleteFiles();
if (m_pauseAfterRecheck) {
m_pauseAfterRecheck = false;
pause();
}
}
m_session->handleTorrentChecked(this);

View File

@ -463,7 +463,6 @@ namespace BitTorrent
bool m_needsToSetFirstLastPiecePriority;
bool m_needsToStartForced;
bool m_pauseAfterRecheck;
QHash<QString, TrackerInfo> m_trackerInfos;
enum StartupState