mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
- Started work on program preferences in Web UI
This commit is contained in:
parent
52ac94cc73
commit
9a16a9d11b
8 changed files with 121 additions and 14 deletions
|
@ -32,6 +32,7 @@
|
|||
#include "eventmanager.h"
|
||||
#include "bittorrent.h"
|
||||
#include "misc.h"
|
||||
#include "preferences.h"
|
||||
#include "proplistdelegate.h"
|
||||
#include "torrentpersistentdata.h"
|
||||
#include <QDebug>
|
||||
|
@ -118,6 +119,17 @@ QList<QVariantMap> EventManager::getPropFilesInfo(QString hash) const {
|
|||
return files;
|
||||
}
|
||||
|
||||
QVariantMap EventManager::getGlobalPreferences() const {
|
||||
QVariantMap data;
|
||||
data["dl_limit"] = Preferences::getGlobalDownloadLimit();
|
||||
data["up_limit"] = Preferences::getGlobalUploadLimit();
|
||||
data["dht"] = Preferences::isDHTEnabled();
|
||||
data["max_connec"] = Preferences::getMaxConnecs();
|
||||
data["max_connec_per_torrent"] = Preferences::getMaxConnecsPerTorrent();
|
||||
data["max_uploads_per_torrent"] = Preferences::getMaxUploadsPerTorrent();
|
||||
return data;
|
||||
}
|
||||
|
||||
QVariantMap EventManager::getPropGeneralInfo(QString hash) const {
|
||||
QVariantMap data;
|
||||
QTorrentHandle h = BTSession->getTorrentHandle(hash);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue