mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-03 06:02:29 -06:00
RSS: Better cookies support
This commit is contained in:
@@ -2757,7 +2757,8 @@ QString QBtSession::getSavePath(const QString &hash, bool fromScanDir, QString f
|
||||
// Take an url string to a torrent file,
|
||||
// download the torrent file to a tmp location, then
|
||||
// add it to download list
|
||||
void QBtSession::downloadFromUrl(const QString &url) {
|
||||
void QBtSession::downloadFromUrl(const QString &url, const QList<QNetworkCookie>& cookies)
|
||||
{
|
||||
addConsoleMessage(tr("Downloading '%1', please wait...", "e.g: Downloading 'xxx.torrent', please wait...").arg(url)
|
||||
#ifndef DISABLE_GUI
|
||||
, QPalette::WindowText
|
||||
@@ -2765,7 +2766,7 @@ void QBtSession::downloadFromUrl(const QString &url) {
|
||||
);
|
||||
//emit aboutToDownloadFromUrl(url);
|
||||
// Launch downloader thread
|
||||
downloader->downloadTorrentUrl(url);
|
||||
downloader->downloadTorrentUrl(url, cookies);
|
||||
}
|
||||
|
||||
void QBtSession::downloadFromURLList(const QStringList& urls) {
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
#endif
|
||||
#include <QPointer>
|
||||
#include <QTimer>
|
||||
#include <QNetworkCookie>
|
||||
|
||||
#include <libtorrent/version.hpp>
|
||||
#include <libtorrent/session.hpp>
|
||||
@@ -107,7 +108,7 @@ public slots:
|
||||
QTorrentHandle addMagnetUri(QString magnet_uri, bool resumed=false);
|
||||
void loadSessionState();
|
||||
void saveSessionState();
|
||||
void downloadFromUrl(const QString &url);
|
||||
void downloadFromUrl(const QString &url, const QList<QNetworkCookie>& cookies = QList<QNetworkCookie>());
|
||||
void deleteTorrent(const QString &hash, bool delete_local_files = false);
|
||||
void startUpTorrents();
|
||||
void recheckTorrent(const QString &hash);
|
||||
|
||||
Reference in New Issue
Block a user