Allow setting the number of maximum active checking torrents

This is to allow re-checking of multiple torrents simultaneously. This will benefit users who
have multiple disks or SSD.
Closes #15296.

Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
This commit is contained in:
An0n 2022-02-27 20:08:10 +06:00 committed by Chocobo1
parent 889d994dbc
commit 801cfdbc24
No known key found for this signature in database
GPG key ID: 210D9C873253A68C
7 changed files with 75 additions and 1 deletions

View file

@ -210,6 +210,8 @@ void AppController::preferencesAction()
data["lsd"] = session->isLSDEnabled();
data["encryption"] = session->encryption();
data["anonymous_mode"] = session->isAnonymousModeEnabled();
// Max active checking torrents
data["max_active_checking_torrents"] = session->maxActiveCheckingTorrents();
// Torrent Queueing
data["queueing_enabled"] = session->isQueueingSystemEnabled();
data["max_active_downloads"] = session->maxActiveDownloads();
@ -584,6 +586,9 @@ void AppController::setPreferencesAction()
session->setEncryption(it.value().toInt());
if (hasKey("anonymous_mode"))
session->setAnonymousModeEnabled(it.value().toBool());
// Max active checking torrents
if (hasKey("max_active_checking_torrents"))
session->setMaxActiveCheckingTorrents(it.value().toInt());
// Torrent Queueing
if (hasKey("queueing_enabled"))
session->setQueueingSystemEnabled(it.value().toBool());