mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
DHT port can be changed from Web UI
This commit is contained in:
parent
f2c4901dd0
commit
94c7c5cebe
3 changed files with 44 additions and 0 deletions
|
@ -189,6 +189,10 @@ void EventManager::setGlobalPreferences(QVariantMap m) const {
|
|||
// Bittorrent
|
||||
if(m.contains("dht"))
|
||||
Preferences::setDHTEnabled(m["dht"].toBool());
|
||||
if(m.contains("dhtSameAsBT"))
|
||||
Preferences::setDHTPortSameAsBT(m["dhtSameAsBT"].toBool());
|
||||
if(m.contains("dht_port"))
|
||||
Preferences::setDHTPort(m["dht_port"].toInt());
|
||||
if(m.contains("pex"))
|
||||
Preferences::setPeXEnabled(m["pex"].toBool());
|
||||
qDebug("Pex support: %d", (int)m["pex"].toBool());
|
||||
|
@ -274,6 +278,8 @@ QVariantMap EventManager::getGlobalPreferences() const {
|
|||
data["max_uploads_per_torrent"] = Preferences::getMaxUploadsPerTorrent();
|
||||
// Bittorrent
|
||||
data["dht"] = Preferences::isDHTEnabled();
|
||||
data["dhtSameAsBT"] = Preferences::isDHTPortSameAsBT();
|
||||
data["dht_port"] = Preferences::getDHTPort();
|
||||
data["pex"] = Preferences::isPeXEnabled();
|
||||
data["lsd"] = Preferences::isLSDEnabled();
|
||||
data["encryption"] = Preferences::getEncryptionSetting();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue