mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-09 05:14:23 +00:00
Always save actual queue position
This commit is contained in:
parent
9fa78c7b50
commit
386d0565fe
@ -2360,7 +2360,7 @@ void Session::generateResumeData(bool final)
|
|||||||
if (!final && !torrent->needSaveResumeData()) continue;
|
if (!final && !torrent->needSaveResumeData()) continue;
|
||||||
if (torrent->hasMissingFiles() || torrent->hasError()) continue;
|
if (torrent->hasMissingFiles() || torrent->hasError()) continue;
|
||||||
|
|
||||||
saveTorrentResumeData(torrent, final);
|
saveTorrentResumeData(torrent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3531,10 +3531,10 @@ void Session::handleTorrentShareLimitChanged(TorrentHandle *const torrent)
|
|||||||
updateSeedingLimitTimer();
|
updateSeedingLimitTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Session::saveTorrentResumeData(TorrentHandle *const torrent, bool finalSave)
|
void Session::saveTorrentResumeData(TorrentHandle *const torrent)
|
||||||
{
|
{
|
||||||
qDebug("Saving fastresume data for %s", qUtf8Printable(torrent->name()));
|
qDebug("Saving fastresume data for %s", qUtf8Printable(torrent->name()));
|
||||||
torrent->saveResumeData(finalSave);
|
torrent->saveResumeData();
|
||||||
++m_numResumeData;
|
++m_numResumeData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -606,7 +606,7 @@ namespace BitTorrent
|
|||||||
|
|
||||||
void updateSeedingLimitTimer();
|
void updateSeedingLimitTimer();
|
||||||
void exportTorrentFile(TorrentHandle *const torrent, TorrentExportFolder folder = TorrentExportFolder::Regular);
|
void exportTorrentFile(TorrentHandle *const torrent, TorrentExportFolder folder = TorrentExportFolder::Regular);
|
||||||
void saveTorrentResumeData(TorrentHandle *const torrent, bool finalSave = false);
|
void saveTorrentResumeData(TorrentHandle *const torrent);
|
||||||
|
|
||||||
void handleAlert(libtorrent::alert *a);
|
void handleAlert(libtorrent::alert *a);
|
||||||
void dispatchTorrentAlert(libtorrent::alert *a);
|
void dispatchTorrentAlert(libtorrent::alert *a);
|
||||||
|
@ -504,11 +504,8 @@ bool TorrentHandle::needSaveResumeData() const
|
|||||||
return m_nativeHandle.need_save_resume_data();
|
return m_nativeHandle.need_save_resume_data();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TorrentHandle::saveResumeData(bool updateStatus)
|
void TorrentHandle::saveResumeData()
|
||||||
{
|
{
|
||||||
if (updateStatus) // to update queue_position, see discussion in PR #6154
|
|
||||||
this->updateStatus();
|
|
||||||
|
|
||||||
m_nativeHandle.save_resume_data();
|
m_nativeHandle.save_resume_data();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1646,7 +1643,7 @@ void TorrentHandle::handleSaveResumeDataAlert(const libtorrent::save_resume_data
|
|||||||
resumeData["qBt-name"] = m_name.toStdString();
|
resumeData["qBt-name"] = m_name.toStdString();
|
||||||
resumeData["qBt-seedStatus"] = m_hasSeedStatus;
|
resumeData["qBt-seedStatus"] = m_hasSeedStatus;
|
||||||
resumeData["qBt-tempPathDisabled"] = m_tempPathDisabled;
|
resumeData["qBt-tempPathDisabled"] = m_tempPathDisabled;
|
||||||
resumeData["qBt-queuePosition"] = queuePosition();
|
resumeData["qBt-queuePosition"] = (nativeHandle().queue_position() + 1); // qBt starts queue at 1
|
||||||
resumeData["qBt-hasRootFolder"] = m_hasRootFolder;
|
resumeData["qBt-hasRootFolder"] = m_hasRootFolder;
|
||||||
|
|
||||||
m_session->handleTorrentResumeDataReady(this, resumeData);
|
m_session->handleTorrentResumeDataReady(this, resumeData);
|
||||||
|
@ -372,7 +372,7 @@ namespace BitTorrent
|
|||||||
void handleTempPathChanged();
|
void handleTempPathChanged();
|
||||||
void handleCategorySavePathChanged();
|
void handleCategorySavePathChanged();
|
||||||
void handleAppendExtensionToggled();
|
void handleAppendExtensionToggled();
|
||||||
void saveResumeData(bool updateStatus = false);
|
void saveResumeData();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief fraction of file pieces that are available at least from one peer
|
* @brief fraction of file pieces that are available at least from one peer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user