Add unified class to represent parsed torrent metadata

* Add unified class to represent parsed torrent metadata
* Unify startup logic of "Add new torrent dialog"

PR #19301.
This commit is contained in:
Vladimir Golovnev 2023-07-21 08:40:16 +03:00 committed by GitHub
parent d554f4d44a
commit f27f2c20e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 498 additions and 439 deletions

View file

@ -199,11 +199,9 @@ void Net::DownloadHandlerImpl::handleRedirection(const QUrl &newUrl)
// Redirect to magnet workaround
if (newUrlString.startsWith(u"magnet:", Qt::CaseInsensitive))
{
qDebug("Magnet redirect detected.");
m_result.status = Net::DownloadStatus::RedirectedToMagnet;
m_result.magnet = newUrlString;
m_result.magnetURI = newUrlString;
m_result.errorString = tr("Redirected to magnet URI");
finish();
return;
}