@@ -378,8 +378,16 @@ void AppController::preferencesAction()
378
378
data[u" resolve_peer_countries" _s] = pref->resolvePeerCountries ();
379
379
// Reannounce to all trackers when ip/port changed
380
380
data[u" reannounce_when_address_changed" _s] = session->isReannounceWhenAddressChangedEnabled ();
381
+ // Embedded tracker
382
+ data[u" enable_embedded_tracker" _s] = session->isTrackerEnabled ();
383
+ data[u" embedded_tracker_port" _s] = pref->getTrackerPort ();
384
+ data[u" embedded_tracker_port_forwarding" _s] = pref->isTrackerPortForwardingEnabled ();
385
+ // Mark-of-the-Web
386
+ data[u" mark_of_the_web" _s] = pref->isMarkOfTheWebEnabled ();
381
387
// Ignore SSL errors
382
388
data[u" ignore_ssl_errors" _s] = pref->isIgnoreSSLErrors ();
389
+ // Python executable path
390
+ data[u" python_executable_path" _s] = pref->getPythonExecutablePath ().toString ();
383
391
384
392
// libtorrent preferences
385
393
// Bdecode depth limit
@@ -442,14 +450,6 @@ void AppController::preferencesAction()
442
450
data[u" ssrf_mitigation" _s] = session->isSSRFMitigationEnabled ();
443
451
// Disallow connection to peers on privileged ports
444
452
data[u" block_peers_on_privileged_ports" _s] = session->blockPeersOnPrivilegedPorts ();
445
- // Embedded tracker
446
- data[u" enable_embedded_tracker" _s] = session->isTrackerEnabled ();
447
- data[u" embedded_tracker_port" _s] = pref->getTrackerPort ();
448
- data[u" embedded_tracker_port_forwarding" _s] = pref->isTrackerPortForwardingEnabled ();
449
- // Mark-of-the-Web
450
- data[u" mark_of_the_web" _s] = pref->isMarkOfTheWebEnabled ();
451
- // Python executable path
452
- data[u" python_executable_path" _s] = pref->getPythonExecutablePath ().toString ();
453
453
// Choking algorithm
454
454
data[u" upload_slots_behavior" _s] = static_cast <int >(session->chokingAlgorithm ());
455
455
// Seed choking algorithm
@@ -994,9 +994,22 @@ void AppController::setPreferencesAction()
994
994
// Reannounce to all trackers when ip/port changed
995
995
if (hasKey (u" reannounce_when_address_changed" _s))
996
996
session->setReannounceWhenAddressChangedEnabled (it.value ().toBool ());
997
+ // Embedded tracker
998
+ if (hasKey (u" embedded_tracker_port" _s))
999
+ pref->setTrackerPort (it.value ().toInt ());
1000
+ if (hasKey (u" embedded_tracker_port_forwarding" _s))
1001
+ pref->setTrackerPortForwardingEnabled (it.value ().toBool ());
1002
+ if (hasKey (u" enable_embedded_tracker" _s))
1003
+ session->setTrackerEnabled (it.value ().toBool ());
1004
+ // Mark-of-the-Web
1005
+ if (hasKey (u" mark_of_the_web" _s))
1006
+ pref->setMarkOfTheWebEnabled (it.value ().toBool ());
997
1007
// Ignore SLL errors
998
1008
if (hasKey (u" ignore_ssl_errors" _s))
999
1009
pref->setIgnoreSSLErrors (it.value ().toBool ());
1010
+ // Python executable path
1011
+ if (hasKey (u" python_executable_path" _s))
1012
+ pref->setPythonExecutablePath (Path (it.value ().toString ()));
1000
1013
1001
1014
// libtorrent preferences
1002
1015
// Bdecode depth limit
@@ -1091,19 +1104,6 @@ void AppController::setPreferencesAction()
1091
1104
// Disallow connection to peers on privileged ports
1092
1105
if (hasKey (u" block_peers_on_privileged_ports" _s))
1093
1106
session->setBlockPeersOnPrivilegedPorts (it.value ().toBool ());
1094
- // Embedded tracker
1095
- if (hasKey (u" embedded_tracker_port" _s))
1096
- pref->setTrackerPort (it.value ().toInt ());
1097
- if (hasKey (u" embedded_tracker_port_forwarding" _s))
1098
- pref->setTrackerPortForwardingEnabled (it.value ().toBool ());
1099
- if (hasKey (u" enable_embedded_tracker" _s))
1100
- session->setTrackerEnabled (it.value ().toBool ());
1101
- // Mark-of-the-Web
1102
- if (hasKey (u" mark_of_the_web" _s))
1103
- pref->setMarkOfTheWebEnabled (it.value ().toBool ());
1104
- // Python executable path
1105
- if (hasKey (u" python_executable_path" _s))
1106
- pref->setPythonExecutablePath (Path (it.value ().toString ()));
1107
1107
// Choking algorithm
1108
1108
if (hasKey (u" upload_slots_behavior" _s))
1109
1109
session->setChokingAlgorithm (static_cast <BitTorrent::ChokingAlgorithm>(it.value ().toInt ()));
0 commit comments