Increase the download size limit to 100 MiB

This commit is contained in:
thalieht
2019-04-08 20:09:16 +03:00
parent 8f6c305d14
commit 11da8b82e8
4 changed files with 6 additions and 5 deletions

View File

@@ -2100,7 +2100,7 @@ bool Session::addTorrent(QString source, const AddTorrentParams &params)
LogMsg(tr("Downloading '%1', please wait...", "e.g: Downloading 'xxx.torrent', please wait...").arg(source));
// Launch downloader
Net::DownloadHandler *handler =
Net::DownloadManager::instance()->download(Net::DownloadRequest(source).limit(10485760 /* 10MB */).handleRedirectToMagnet(true));
Net::DownloadManager::instance()->download(Net::DownloadRequest(source).limit(MAX_TORRENT_SIZE).handleRedirectToMagnet(true));
connect(handler, static_cast<void (Net::DownloadHandler::*)(const QString &, const QByteArray &)>(&Net::DownloadHandler::downloadFinished)
, this, &Session::handleDownloadFinished);
connect(handler, &Net::DownloadHandler::downloadFailed, this, &Session::handleDownloadFailed);