mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-07 13:41:26 -07:00
parent
30189ae943
commit
a3888811f6
3 changed files with 117 additions and 1 deletions
|
@ -193,6 +193,16 @@ void AppController::preferencesAction()
|
|||
data[u"max_uploads"_s] = session->maxUploads();
|
||||
data[u"max_uploads_per_torrent"_s] = session->maxUploadsPerTorrent();
|
||||
|
||||
// I2P
|
||||
data[u"i2p_enabled"_s] = session->isI2PEnabled();
|
||||
data[u"i2p_address"_s] = session->I2PAddress();
|
||||
data[u"i2p_port"_s] = session->I2PPort();
|
||||
data[u"i2p_mixed_mode"_s] = session->I2PMixedMode();
|
||||
data[u"i2p_inbound_quantity"_s] = session->I2PInboundQuantity();
|
||||
data[u"i2p_outbound_quantity"_s] = session->I2POutboundQuantity();
|
||||
data[u"i2p_inbound_length"_s] = session->I2PInboundLength();
|
||||
data[u"i2p_outbound_length"_s] = session->I2POutboundLength();
|
||||
|
||||
// Proxy Server
|
||||
const auto *proxyManager = Net::ProxyConfigurationManager::instance();
|
||||
Net::ProxyConfiguration proxyConf = proxyManager->proxyConfiguration();
|
||||
|
@ -632,6 +642,24 @@ void AppController::setPreferencesAction()
|
|||
if (hasKey(u"max_uploads_per_torrent"_s))
|
||||
session->setMaxUploadsPerTorrent(it.value().toInt());
|
||||
|
||||
// I2P
|
||||
if (hasKey(u"i2p_enabled"_s))
|
||||
session->setI2PEnabled(it.value().toBool());
|
||||
if (hasKey(u"i2p_address"_s))
|
||||
session->setI2PAddress(it.value().toString());
|
||||
if (hasKey(u"i2p_port"_s))
|
||||
session->setI2PPort(it.value().toInt());
|
||||
if (hasKey(u"i2p_mixed_mode"_s))
|
||||
session->setI2PMixedMode(it.value().toBool());
|
||||
if (hasKey(u"i2p_inbound_quantity"_s))
|
||||
session->setI2PInboundQuantity(it.value().toInt());
|
||||
if (hasKey(u"i2p_outbound_quantity"_s))
|
||||
session->setI2POutboundQuantity(it.value().toInt());
|
||||
if (hasKey(u"i2p_inbound_length"_s))
|
||||
session->setI2PInboundLength(it.value().toInt());
|
||||
if (hasKey(u"i2p_outbound_length"_s))
|
||||
session->setI2POutboundLength(it.value().toInt());
|
||||
|
||||
// Proxy Server
|
||||
auto *proxyManager = Net::ProxyConfigurationManager::instance();
|
||||
Net::ProxyConfiguration proxyConf = proxyManager->proxyConfiguration();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue