Improve DownloadManager.

Now we can use downloaded data directly without saving to file.
We also can disable redirection to Magnet URI handling (useful for
non-torrent files downloading).
This commit is contained in:
Vladimir Golovnev (Glassez)
2015-06-03 11:49:39 +03:00
parent 336519b7b5
commit c702a7e426
11 changed files with 45 additions and 27 deletions

View File

@@ -59,7 +59,7 @@ QStringList TrackersAdditionDlg::newTrackers() const
void TrackersAdditionDlg::on_uTorrentListButton_clicked()
{
uTorrentListButton->setEnabled(false);
Net::DownloadHandler *handler = Net::DownloadManager::instance()->downloadUrl(QString("http://www.torrentz.com/announce_%1").arg(m_torrent->hash()));
Net::DownloadHandler *handler = Net::DownloadManager::instance()->downloadUrl(QString("http://www.torrentz.com/announce_%1").arg(m_torrent->hash()), true);
connect(handler, SIGNAL(downloadFinished(QString, QString)), this, SLOT(parseUTorrentList(QString, QString)));
connect(handler, SIGNAL(downloadFailed(QString, QString)), this, SLOT(getTrackerError(QString, QString)));
//Just to show that it takes times