Clean up metadata downloading code

This commit is contained in:
Vladimir Golovnev (Glassez)
2020-11-21 15:16:21 +03:00
parent 82716d8014
commit 0e8feed2f2
3 changed files with 33 additions and 42 deletions

View File

@@ -453,8 +453,8 @@ namespace BitTorrent
bool addTorrent(const MagnetUri &magnetUri, const AddTorrentParams &params = AddTorrentParams());
bool addTorrent(const TorrentInfo &torrentInfo, const AddTorrentParams &params = AddTorrentParams());
bool deleteTorrent(const InfoHash &hash, DeleteOption deleteOption = Torrent);
bool loadMetadata(const MagnetUri &magnetUri);
bool cancelLoadMetadata(const InfoHash &hash);
bool downloadMetadata(const MagnetUri &magnetUri);
bool cancelDownloadMetadata(const InfoHash &hash);
void recursiveTorrentDownload(const InfoHash &hash);
void increaseTorrentsQueuePos(const QVector<InfoHash> &hashes);
@@ -497,7 +497,7 @@ namespace BitTorrent
void fullDiskError(TorrentHandle *torrent, const QString &msg);
void IPFilterParsed(bool error, int ruleCount);
void loadTorrentFailed(const QString &error);
void metadataLoaded(const TorrentInfo &info);
void metadataDownloaded(const TorrentInfo &info);
void recursiveTorrentDownloadPossible(TorrentHandle *torrent);
void speedLimitModeChanged(bool alternative);
void statsUpdated();
@@ -764,7 +764,7 @@ namespace BitTorrent
QThread *m_ioThread = nullptr;
ResumeDataSavingManager *m_resumeDataSavingManager = nullptr;
QSet<InfoHash> m_loadedMetadata;
QSet<InfoHash> m_downloadedMetadata;
QHash<InfoHash, TorrentHandleImpl *> m_torrents;
QHash<InfoHash, LoadTorrentParams> m_loadingTorrents;