mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-14 01:03:08 -07:00
Fix received metadata handling
This commit is contained in:
parent
7cfe68f46c
commit
5f34d1555b
5 changed files with 154 additions and 47 deletions
|
@ -1757,6 +1757,13 @@ void Session::handleDownloadFinished(const Net::DownloadResult &result)
|
|||
|
||||
void Session::fileSearchFinished(const InfoHash &id, const QString &savePath, const QStringList &fileNames)
|
||||
{
|
||||
TorrentHandleImpl *torrent = m_torrents.value(id);
|
||||
if (torrent)
|
||||
{
|
||||
torrent->fileSearchFinished(savePath, fileNames);
|
||||
return;
|
||||
}
|
||||
|
||||
const auto loadingTorrentsIter = m_loadingTorrents.find(id);
|
||||
if (loadingTorrentsIter != m_loadingTorrents.end())
|
||||
{
|
||||
|
@ -4571,7 +4578,7 @@ void Session::createTorrentHandle(const lt::torrent_handle &nativeHandle)
|
|||
|
||||
const LoadTorrentParams params = m_loadingTorrents.take(nativeHandle.info_hash());
|
||||
|
||||
auto *const torrent = new TorrentHandleImpl {this, nativeHandle, params};
|
||||
auto *const torrent = new TorrentHandleImpl {this, m_nativeSession, nativeHandle, params};
|
||||
m_torrents.insert(torrent->hash(), torrent);
|
||||
|
||||
const bool hasMetadata = torrent->hasMetadata();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue