Merge pull request #13587 from Chocobo1/webapi

Avoid settings being reset via WebAPI
This commit is contained in:
Mike Tzou 2020-10-22 13:33:29 +08:00 committed by GitHub
commit 46ebf9b7e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -570,8 +570,10 @@ void AppController::setPreferencesAction()
if (hasKey("max_ratio_act")) if (hasKey("max_ratio_act"))
session->setMaxRatioAction(static_cast<MaxRatioAction>(it.value().toInt())); session->setMaxRatioAction(static_cast<MaxRatioAction>(it.value().toInt()));
// Add trackers // Add trackers
session->setAddTrackersEnabled(m["add_trackers_enabled"].toBool()); if (hasKey("add_trackers_enabled"))
session->setAdditionalTrackers(m["add_trackers"].toString()); session->setAddTrackersEnabled(it.value().toBool());
if (hasKey("add_trackers"))
session->setAdditionalTrackers(it.value().toString());
// Web UI // Web UI
// Language // Language