Browse Source

Merge pull request #8715 from glassez/max-ratio

Fix setting preferences via WebAPI. Closes #7335
adaptive-webui-19844
sledgehammer999 7 years ago committed by GitHub
parent
commit
6ca2e42bca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      src/webui/api/appcontroller.cpp

8
src/webui/api/appcontroller.cpp

@ -409,14 +409,18 @@ void AppController::setPreferencesAction() @@ -409,14 +409,18 @@ void AppController::setPreferencesAction()
if (m.contains("dont_count_slow_torrents"))
session->setIgnoreSlowTorrentsForQueueing(m["dont_count_slow_torrents"].toBool());
// Share Ratio Limiting
if (m.contains("max_ratio_enabled"))
if (m.contains("max_ratio_enabled")) {
if (m["max_ratio_enabled"].toBool())
session->setGlobalMaxRatio(m["max_ratio"].toReal());
else
session->setGlobalMaxRatio(-1);
if (m.contains("max_seeding_time_enabled"))
}
if (m.contains("max_seeding_time_enabled")) {
if (m["max_seeding_time_enabled"].toBool())
session->setGlobalMaxSeedingMinutes(m["max_seeding_time"].toInt());
else
session->setGlobalMaxSeedingMinutes(-1);
}
if (m.contains("max_ratio_act"))
session->setMaxRatioAction(static_cast<MaxRatioAction>(m["max_ratio_act"].toInt()));
// Add trackers

Loading…
Cancel
Save