Implement gateway for adding new torrents

PR #19355.
This commit is contained in:
Vladimir Golovnev 2023-08-14 18:17:56 +03:00 committed by GitHub
commit dcf3e97291
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
42 changed files with 933 additions and 639 deletions

View file

@ -47,6 +47,7 @@
#include "base/bittorrent/torrent.h"
#include "base/bittorrent/torrentdescriptor.h"
#include "base/bittorrent/trackerentry.h"
#include "base/interfaces/iapplication.h"
#include "base/global.h"
#include "base/logger.h"
#include "base/net/downloadmanager.h"
@ -732,7 +733,7 @@ void TorrentsController::addAction()
if (!url.isEmpty())
{
Net::DownloadManager::instance()->setCookiesFromUrl(cookies, QUrl::fromEncoded(url.toUtf8()));
partialSuccess |= BitTorrent::Session::instance()->addTorrent(url, addTorrentParams);
partialSuccess |= app()->addTorrentManager()->addTorrent(url, addTorrentParams);
}
}