mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 15:37:26 -06:00
@@ -591,20 +591,20 @@ void AddNewTorrentDialog::reject()
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
void AddNewTorrentDialog::updateMetadata(const BitTorrent::TorrentInfo &info)
|
||||
void AddNewTorrentDialog::updateMetadata(const BitTorrent::TorrentInfo &metadata)
|
||||
{
|
||||
if (info.hash() != m_hash) return;
|
||||
if (metadata.hash() != m_magnetURI.hash()) return;
|
||||
|
||||
disconnect(BitTorrent::Session::instance(), &BitTorrent::Session::metadataLoaded, this, &AddNewTorrentDialog::updateMetadata);
|
||||
|
||||
if (!info.isValid()) {
|
||||
if (!metadata.isValid()) {
|
||||
RaisedMessageBox::critical(this, tr("I/O Error"), ("Invalid metadata."));
|
||||
setMetadataProgressIndicator(false, tr("Invalid metadata"));
|
||||
return;
|
||||
}
|
||||
|
||||
// Good to go
|
||||
m_torrentInfo = info;
|
||||
m_torrentInfo = metadata;
|
||||
m_hasMetadata = true;
|
||||
setMetadataProgressIndicator(true, tr("Parsing metadata..."));
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ private slots:
|
||||
void displayContentTreeMenu(const QPoint &);
|
||||
void updateDiskSpaceLabel();
|
||||
void onSavePathChanged(const QString &newPath);
|
||||
void updateMetadata(const BitTorrent::TorrentInfo &info);
|
||||
void updateMetadata(const BitTorrent::TorrentInfo &metadata);
|
||||
void handleDownloadFinished(const Net::DownloadResult &result);
|
||||
void TMMChanged(int index);
|
||||
void categoryChanged(int index);
|
||||
|
||||
Reference in New Issue
Block a user