@@ -389,6 +389,16 @@ void AppController::preferencesAction()
389
389
data[u" resolve_peer_countries" _s] = pref->resolvePeerCountries ();
390
390
// Reannounce to all trackers when ip/port changed
391
391
data[u" reannounce_when_address_changed" _s] = session->isReannounceWhenAddressChangedEnabled ();
392
+ // Embedded tracker
393
+ data[u" enable_embedded_tracker" _s] = session->isTrackerEnabled ();
394
+ data[u" embedded_tracker_port" _s] = pref->getTrackerPort ();
395
+ data[u" embedded_tracker_port_forwarding" _s] = pref->isTrackerPortForwardingEnabled ();
396
+ // Mark-of-the-Web
397
+ data[u" mark_of_the_web" _s] = pref->isMarkOfTheWebEnabled ();
398
+ // Ignore SSL errors
399
+ data[u" ignore_ssl_errors" _s] = pref->isIgnoreSSLErrors ();
400
+ // Python executable path
401
+ data[u" python_executable_path" _s] = pref->getPythonExecutablePath ().toString ();
392
402
393
403
// libtorrent preferences
394
404
// Bdecode depth limit
@@ -451,14 +461,6 @@ void AppController::preferencesAction()
451
461
data[u" ssrf_mitigation" _s] = session->isSSRFMitigationEnabled ();
452
462
// Disallow connection to peers on privileged ports
453
463
data[u" block_peers_on_privileged_ports" _s] = session->blockPeersOnPrivilegedPorts ();
454
- // Embedded tracker
455
- data[u" enable_embedded_tracker" _s] = session->isTrackerEnabled ();
456
- data[u" embedded_tracker_port" _s] = pref->getTrackerPort ();
457
- data[u" embedded_tracker_port_forwarding" _s] = pref->isTrackerPortForwardingEnabled ();
458
- // Mark-of-the-Web
459
- data[u" mark_of_the_web" _s] = pref->isMarkOfTheWebEnabled ();
460
- // Python executable path
461
- data[u" python_executable_path" _s] = pref->getPythonExecutablePath ().toString ();
462
464
// Choking algorithm
463
465
data[u" upload_slots_behavior" _s] = static_cast <int >(session->chokingAlgorithm ());
464
466
// Seed choking algorithm
@@ -1006,6 +1008,22 @@ void AppController::setPreferencesAction()
1006
1008
// Reannounce to all trackers when ip/port changed
1007
1009
if (hasKey (u" reannounce_when_address_changed" _s))
1008
1010
session->setReannounceWhenAddressChangedEnabled (it.value ().toBool ());
1011
+ // Embedded tracker
1012
+ if (hasKey (u" embedded_tracker_port" _s))
1013
+ pref->setTrackerPort (it.value ().toInt ());
1014
+ if (hasKey (u" embedded_tracker_port_forwarding" _s))
1015
+ pref->setTrackerPortForwardingEnabled (it.value ().toBool ());
1016
+ if (hasKey (u" enable_embedded_tracker" _s))
1017
+ session->setTrackerEnabled (it.value ().toBool ());
1018
+ // Mark-of-the-Web
1019
+ if (hasKey (u" mark_of_the_web" _s))
1020
+ pref->setMarkOfTheWebEnabled (it.value ().toBool ());
1021
+ // Ignore SLL errors
1022
+ if (hasKey (u" ignore_ssl_errors" _s))
1023
+ pref->setIgnoreSSLErrors (it.value ().toBool ());
1024
+ // Python executable path
1025
+ if (hasKey (u" python_executable_path" _s))
1026
+ pref->setPythonExecutablePath (Path (it.value ().toString ()));
1009
1027
1010
1028
// libtorrent preferences
1011
1029
// Bdecode depth limit
@@ -1100,19 +1118,6 @@ void AppController::setPreferencesAction()
1100
1118
// Disallow connection to peers on privileged ports
1101
1119
if (hasKey (u" block_peers_on_privileged_ports" _s))
1102
1120
session->setBlockPeersOnPrivilegedPorts (it.value ().toBool ());
1103
- // Embedded tracker
1104
- if (hasKey (u" embedded_tracker_port" _s))
1105
- pref->setTrackerPort (it.value ().toInt ());
1106
- if (hasKey (u" embedded_tracker_port_forwarding" _s))
1107
- pref->setTrackerPortForwardingEnabled (it.value ().toBool ());
1108
- if (hasKey (u" enable_embedded_tracker" _s))
1109
- session->setTrackerEnabled (it.value ().toBool ());
1110
- // Mark-of-the-Web
1111
- if (hasKey (u" mark_of_the_web" _s))
1112
- pref->setMarkOfTheWebEnabled (it.value ().toBool ());
1113
- // Python executable path
1114
- if (hasKey (u" python_executable_path" _s))
1115
- pref->setPythonExecutablePath (Path (it.value ().toString ()));
1116
1121
// Choking algorithm
1117
1122
if (hasKey (u" upload_slots_behavior" _s))
1118
1123
session->setChokingAlgorithm (static_cast <BitTorrent::ChokingAlgorithm>(it.value ().toInt ()));
0 commit comments