mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-12 08:16:16 -07:00
Add support for RSS feeds using magnet links (Closes #1016379)
This commit is contained in:
parent
39ea57fe29
commit
5a65580169
6 changed files with 50 additions and 19 deletions
|
@ -145,6 +145,7 @@ MainWindow::MainWindow(QWidget *parent, const QStringList& torrentCmdLine) : QMa
|
|||
connect(QBtSession::instance(), SIGNAL(finishedTorrent(QTorrentHandle)), this, SLOT(finishedTorrent(QTorrentHandle)));
|
||||
connect(QBtSession::instance(), SIGNAL(trackerAuthenticationRequired(QTorrentHandle)), this, SLOT(trackerAuthenticationRequired(QTorrentHandle)));
|
||||
connect(QBtSession::instance(), SIGNAL(newDownloadedTorrent(QString, QString)), this, SLOT(processDownloadedFiles(QString, QString)));
|
||||
connect(QBtSession::instance(), SIGNAL(newMagnetLink(QString)), this, SLOT(processNewMagnetLink(QString)));
|
||||
connect(QBtSession::instance(), SIGNAL(downloadFromUrlFailure(QString, QString)), this, SLOT(handleDownloadFromUrlFailure(QString, QString)));
|
||||
connect(QBtSession::instance(), SIGNAL(alternativeSpeedsModeChanged(bool)), this, SLOT(updateAltSpeedsBtn(bool)));
|
||||
connect(QBtSession::instance(), SIGNAL(recursiveTorrentDownloadPossible(QTorrentHandle)), this, SLOT(askRecursiveTorrentDownloadConfirmation(QTorrentHandle)));
|
||||
|
@ -979,6 +980,16 @@ void MainWindow::processDownloadedFiles(QString path, QString url) {
|
|||
QBtSession::instance()->addTorrent(path, false, url);
|
||||
}
|
||||
|
||||
void MainWindow::processNewMagnetLink(const QString& link)
|
||||
{
|
||||
QIniSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
|
||||
const bool useTorrentAdditionDialog = settings.value(QString::fromUtf8("Preferences/Downloads/AdditionDialog"), true).toBool();
|
||||
if (useTorrentAdditionDialog)
|
||||
AddNewTorrentDialog::showMagnet(link);
|
||||
else
|
||||
QBtSession::instance()->addMagnetUri(link);
|
||||
}
|
||||
|
||||
void MainWindow::optionsSaved() {
|
||||
loadPreferences();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue