mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 23:47:23 -06:00
Don't force update torrent status
This commit is contained in:
@@ -1654,7 +1654,7 @@ void TorrentImpl::moveStorage(const Path &newPath, const MoveStorageMode mode)
|
||||
if (m_session->addMoveTorrentStorageJob(this, newPath, mode))
|
||||
{
|
||||
m_storageIsMoving = true;
|
||||
updateStatus();
|
||||
updateState();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1670,13 +1670,16 @@ void TorrentImpl::handleStateUpdate(const lt::torrent_status &nativeStatus)
|
||||
updateStatus(nativeStatus);
|
||||
}
|
||||
|
||||
void TorrentImpl::handleMoveStorageJobFinished(const bool hasOutstandingJob)
|
||||
void TorrentImpl::handleMoveStorageJobFinished(const Path &path, const bool hasOutstandingJob)
|
||||
{
|
||||
m_session->handleTorrentNeedSaveResumeData(this);
|
||||
m_storageIsMoving = hasOutstandingJob;
|
||||
|
||||
updateStatus();
|
||||
m_session->handleTorrentSavePathChanged(this);
|
||||
if (actualStorageLocation() != path)
|
||||
{
|
||||
m_nativeStatus.save_path = path.toString().toStdString();
|
||||
m_session->handleTorrentSavePathChanged(this);
|
||||
}
|
||||
|
||||
if (!m_storageIsMoving)
|
||||
{
|
||||
@@ -1690,7 +1693,7 @@ void TorrentImpl::handleMoveStorageJobFinished(const bool hasOutstandingJob)
|
||||
}
|
||||
|
||||
while ((m_renameCount == 0) && !m_moveFinishedTriggers.isEmpty())
|
||||
m_moveFinishedTriggers.takeFirst()();
|
||||
std::invoke(m_moveFinishedTriggers.dequeue());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2106,11 +2109,6 @@ bool TorrentImpl::isMoveInProgress() const
|
||||
return m_storageIsMoving;
|
||||
}
|
||||
|
||||
void TorrentImpl::updateStatus()
|
||||
{
|
||||
updateStatus(m_nativeHandle.status());
|
||||
}
|
||||
|
||||
void TorrentImpl::updateStatus(const lt::torrent_status &nativeStatus)
|
||||
{
|
||||
m_pieces.clear();
|
||||
|
||||
Reference in New Issue
Block a user