Improve embedded tracker

Now it conforms to BEPs more closely.
This commit is contained in:
Chocobo1 2019-08-08 23:21:07 +08:00
parent 94f7a095bb
commit 8d0d8e4dcb
No known key found for this signature in database
GPG key ID: 210D9C873253A68C
10 changed files with 423 additions and 230 deletions

View file

@ -713,10 +713,10 @@ void AppController::setPreferencesAction()
if (hasKey("enable_multi_connections_from_same_ip"))
session->setMultiConnectionsPerIpEnabled(it.value().toBool());
// Embedded tracker
if (hasKey("enable_embedded_tracker"))
session->setTrackerEnabled(it.value().toBool());
if (hasKey("embedded_tracker_port"))
pref->setTrackerPort(it.value().toInt());
if (hasKey("enable_embedded_tracker"))
session->setTrackerEnabled(it.value().toBool());
// Choking algorithm
if (hasKey("upload_slots_behavior"))
session->setChokingAlgorithm(static_cast<BitTorrent::ChokingAlgorithm>(it.value().toInt()));