Announce to all trackers if IP changed (#15001)

Closes #14545.
This commit is contained in:
zhuangzi926 2021-05-23 14:26:54 +08:00 committed by GitHub
parent 015780fc72
commit 2e8e2b04a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 64 additions and 9 deletions

View file

@ -286,6 +286,8 @@ void AppController::preferencesAction()
data["recheck_completed_torrents"] = pref->recheckTorrentsOnCompletion();
// Resolve peer countries
data["resolve_peer_countries"] = pref->resolvePeerCountries();
// Reannounce to all trackers when ip/port changed
data["reannounce_when_address_changed"] = session->isReannounceWhenAddressChangedEnabled();
// libtorrent preferences
// Async IO threads
@ -733,6 +735,9 @@ void AppController::setPreferencesAction()
// Resolve peer countries
if (hasKey("resolve_peer_countries"))
pref->resolvePeerCountries(it.value().toBool());
// Reannounce to all trackers when ip/port changed
if (hasKey("reannounce_when_address_changed"))
session->setReannounceWhenAddressChangedEnabled(it.value().toBool());
// libtorrent preferences
// Async IO threads