mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 05:43:32 -07:00
parent
72028be563
commit
4497ca4a0e
3 changed files with 15 additions and 2 deletions
|
@ -4637,6 +4637,11 @@ void SessionImpl::handleTorrentInfoHashChanged(TorrentImpl *torrent, const InfoH
|
|||
}
|
||||
}
|
||||
|
||||
void SessionImpl::handleTorrentStorageMovingStateChanged(TorrentImpl *torrent)
|
||||
{
|
||||
emit torrentsUpdated({torrent});
|
||||
}
|
||||
|
||||
bool SessionImpl::addMoveTorrentStorageJob(TorrentImpl *torrent, const Path &newPath, const MoveStorageMode mode)
|
||||
{
|
||||
Q_ASSERT(torrent);
|
||||
|
|
|
@ -422,6 +422,7 @@ namespace BitTorrent
|
|||
void handleTorrentUrlSeedsRemoved(TorrentImpl *const torrent, const QVector<QUrl> &urlSeeds);
|
||||
void handleTorrentResumeDataReady(TorrentImpl *const torrent, const LoadTorrentParams &data);
|
||||
void handleTorrentInfoHashChanged(TorrentImpl *torrent, const InfoHash &prevInfoHash);
|
||||
void handleTorrentStorageMovingStateChanged(TorrentImpl *torrent);
|
||||
|
||||
bool addMoveTorrentStorageJob(TorrentImpl *torrent, const Path &newPath, MoveStorageMode mode);
|
||||
|
||||
|
|
|
@ -1744,9 +1744,13 @@ void TorrentImpl::moveStorage(const Path &newPath, const MoveStorageMode mode)
|
|||
}
|
||||
|
||||
if (m_session->addMoveTorrentStorageJob(this, newPath, mode))
|
||||
{
|
||||
if (!m_storageIsMoving)
|
||||
{
|
||||
m_storageIsMoving = true;
|
||||
updateState();
|
||||
m_session->handleTorrentStorageMovingStateChanged(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1778,6 +1782,9 @@ void TorrentImpl::handleMoveStorageJobFinished(const Path &path, const bool hasO
|
|||
|
||||
if (!m_storageIsMoving)
|
||||
{
|
||||
updateState();
|
||||
m_session->handleTorrentStorageMovingStateChanged(this);
|
||||
|
||||
if (m_hasMissingFiles)
|
||||
{
|
||||
// it can be moved to the proper location
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue