mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 13:23:34 -07:00
Restart "missing files" torrents after changing location
This commit is contained in:
parent
e273ac3a0d
commit
c3f02d833c
1 changed files with 16 additions and 2 deletions
|
@ -1387,6 +1387,7 @@ void TorrentImpl::resume(const TorrentOperatingMode mode)
|
||||||
{
|
{
|
||||||
m_hasMissingFiles = false;
|
m_hasMissingFiles = false;
|
||||||
m_isStopped = false;
|
m_isStopped = false;
|
||||||
|
m_ltAddTorrentParams.ti = std::const_pointer_cast<lt::torrent_info>(m_nativeHandle.torrent_file());
|
||||||
reload();
|
reload();
|
||||||
updateStatus();
|
updateStatus();
|
||||||
return;
|
return;
|
||||||
|
@ -1446,9 +1447,22 @@ void TorrentImpl::handleMoveStorageJobFinished(const bool hasOutstandingJob)
|
||||||
|
|
||||||
saveResumeData();
|
saveResumeData();
|
||||||
|
|
||||||
|
if (!m_storageIsMoving)
|
||||||
|
{
|
||||||
|
if (m_hasMissingFiles)
|
||||||
|
{
|
||||||
|
// it can be moved to the proper location
|
||||||
|
m_hasMissingFiles = false;
|
||||||
|
m_ltAddTorrentParams.save_path = m_nativeStatus.save_path;
|
||||||
|
m_ltAddTorrentParams.ti = std::const_pointer_cast<lt::torrent_info>(m_nativeHandle.torrent_file());
|
||||||
|
reload();
|
||||||
|
updateStatus();
|
||||||
|
}
|
||||||
|
|
||||||
while ((m_renameCount == 0) && !m_moveFinishedTriggers.isEmpty())
|
while ((m_renameCount == 0) && !m_moveFinishedTriggers.isEmpty())
|
||||||
m_moveFinishedTriggers.takeFirst()();
|
m_moveFinishedTriggers.takeFirst()();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void TorrentImpl::handleTrackerReplyAlert(const lt::tracker_reply_alert *p)
|
void TorrentImpl::handleTrackerReplyAlert(const lt::tracker_reply_alert *p)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue