mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Always save info dict when saving fastresume
Otherwise torrents loaded from fastresume won't have it and needs to redownload it from elsewhere and slowing down the startup process. This is also required for the future where we will drop loading the `info` dict from .torrent files.
This commit is contained in:
parent
d657c87243
commit
4aab44e779
2 changed files with 6 additions and 1 deletions
|
@ -3661,6 +3661,11 @@ void Session::startUpTorrents()
|
|||
int resumedTorrentsCount = 0;
|
||||
const auto startupTorrent = [this, &resumeDataDir, &resumedTorrentsCount](const TorrentResumeData ¶ms)
|
||||
{
|
||||
// TODO: Remove loading of .torrent files when starting up existing torrents
|
||||
// Starting from v4.2.0, the required `info` dict will be stored in fastresume too
|
||||
// (besides .torrent file), that means we can remove loading of .torrent files in
|
||||
// a later release, such as v4.3.0.
|
||||
|
||||
const QString filePath = resumeDataDir.filePath(QString("%1.torrent").arg(params.hash));
|
||||
qDebug() << "Starting up torrent" << params.hash << "...";
|
||||
if (!addTorrent_impl(params.addTorrentData, params.magnetUri, TorrentInfo::loadFromFile(filePath), params.data))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue