mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Fetch torrent status when generating final fastresume data
This is done to get correct queue position, which has to be written into the fastresume file. See discussion in #6154.
This commit is contained in:
parent
6cd233dd61
commit
b6e64c13d8
4 changed files with 9 additions and 6 deletions
|
@ -1858,7 +1858,7 @@ void Session::generateResumeData(bool final)
|
|||
if (torrent->isChecking() || torrent->hasError()) continue;
|
||||
if (!final && !torrent->needSaveResumeData()) continue;
|
||||
|
||||
saveTorrentResumeData(torrent);
|
||||
saveTorrentResumeData(torrent, final);
|
||||
qDebug("Saving fastresume data for %s", qPrintable(torrent->name()));
|
||||
}
|
||||
}
|
||||
|
@ -2782,9 +2782,9 @@ void Session::handleTorrentRatioLimitChanged(TorrentHandle *const torrent)
|
|||
updateRatioTimer();
|
||||
}
|
||||
|
||||
void Session::saveTorrentResumeData(TorrentHandle *const torrent)
|
||||
void Session::saveTorrentResumeData(TorrentHandle *const torrent, bool finalSave)
|
||||
{
|
||||
torrent->saveResumeData();
|
||||
torrent->saveResumeData(finalSave);
|
||||
++m_numResumeData;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue