mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 14:08:03 -06:00
Support fetching tracker list from URL
Trackers specified at the URL will be added to newly added public torrents. This feature is adapted from qBittorrent-Enhanced-Edition to allow for automatically adding trackers retrieved from a URL. @ngosang's trackerlist repo is a good example, however I've opted not to include a default URL. Partially addresses #14535. PR #21828.
This commit is contained in:
committed by
GitHub
parent
4f3d77963f
commit
4fc36b9e99
@@ -53,6 +53,7 @@
|
||||
#include "base/bittorrent/sharelimitaction.h"
|
||||
#include "base/exceptions.h"
|
||||
#include "base/global.h"
|
||||
#include "base/net/downloadmanager.h"
|
||||
#include "base/net/portforwarder.h"
|
||||
#include "base/net/proxyconfigurationmanager.h"
|
||||
#include "base/path.h"
|
||||
@@ -1151,6 +1152,10 @@ void OptionsDialog::loadBittorrentTabOptions()
|
||||
m_ui->checkEnableAddTrackers->setChecked(session->isAddTrackersEnabled());
|
||||
m_ui->textTrackers->setPlainText(session->additionalTrackers());
|
||||
|
||||
m_ui->checkAddTrackersFromURL->setChecked(session->isAddTrackersFromURLEnabled());
|
||||
m_ui->textTrackersURL->setText(session->additionalTrackersURL());
|
||||
m_ui->textTrackersFromURL->setPlainText(session->additionalTrackersFromURL());
|
||||
|
||||
connect(m_ui->checkDHT, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
|
||||
connect(m_ui->checkPeX, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
|
||||
connect(m_ui->checkLSD, &QAbstractButton::toggled, this, &ThisType::enableApplyButton);
|
||||
@@ -1184,6 +1189,9 @@ void OptionsDialog::loadBittorrentTabOptions()
|
||||
|
||||
connect(m_ui->checkEnableAddTrackers, &QGroupBox::toggled, this, &ThisType::enableApplyButton);
|
||||
connect(m_ui->textTrackers, &QPlainTextEdit::textChanged, this, &ThisType::enableApplyButton);
|
||||
|
||||
connect(m_ui->checkAddTrackersFromURL, &QGroupBox::toggled, this, &ThisType::enableApplyButton);
|
||||
connect(m_ui->textTrackersURL, &QLineEdit::textChanged, this, &ThisType::enableApplyButton);
|
||||
}
|
||||
|
||||
void OptionsDialog::saveBittorrentTabOptions() const
|
||||
@@ -1221,6 +1229,9 @@ void OptionsDialog::saveBittorrentTabOptions() const
|
||||
|
||||
session->setAddTrackersEnabled(m_ui->checkEnableAddTrackers->isChecked());
|
||||
session->setAdditionalTrackers(m_ui->textTrackers->toPlainText());
|
||||
|
||||
session->setAddTrackersFromURLEnabled(m_ui->checkAddTrackersFromURL->isChecked());
|
||||
session->setAdditionalTrackersURL(m_ui->textTrackersURL->text());
|
||||
}
|
||||
|
||||
void OptionsDialog::loadRSSTabOptions()
|
||||
|
||||
Reference in New Issue
Block a user