mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-04 14:42:29 -06:00
Merge pull request #13882 from jesec/master
WebAPI: allow to attach tags while adding torrents
This commit is contained in:
@@ -567,6 +567,7 @@ void TorrentsController::addAction()
|
|||||||
const TriStateBool rootFolder = parseTriStateBool(params()["root_folder"]);
|
const TriStateBool rootFolder = parseTriStateBool(params()["root_folder"]);
|
||||||
const QString savepath = params()["savepath"].trimmed();
|
const QString savepath = params()["savepath"].trimmed();
|
||||||
const QString category = params()["category"];
|
const QString category = params()["category"];
|
||||||
|
const QSet<QString> tags = List::toSet(params()["tags"].split(',', QString::SkipEmptyParts));
|
||||||
const QString cookie = params()["cookie"];
|
const QString cookie = params()["cookie"];
|
||||||
const QString torrentName = params()["rename"].trimmed();
|
const QString torrentName = params()["rename"].trimmed();
|
||||||
const int upLimit = params()["upLimit"].toInt();
|
const int upLimit = params()["upLimit"].toInt();
|
||||||
@@ -599,6 +600,7 @@ void TorrentsController::addAction()
|
|||||||
params.createSubfolder = rootFolder;
|
params.createSubfolder = rootFolder;
|
||||||
params.savePath = savepath;
|
params.savePath = savepath;
|
||||||
params.category = category;
|
params.category = category;
|
||||||
|
params.tags = tags;
|
||||||
params.name = torrentName;
|
params.name = torrentName;
|
||||||
params.uploadLimit = (upLimit > 0) ? upLimit : -1;
|
params.uploadLimit = (upLimit > 0) ? upLimit : -1;
|
||||||
params.downloadLimit = (dlLimit > 0) ? dlLimit : -1;
|
params.downloadLimit = (dlLimit > 0) ? dlLimit : -1;
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
#include "base/utils/net.h"
|
#include "base/utils/net.h"
|
||||||
#include "base/utils/version.h"
|
#include "base/utils/version.h"
|
||||||
|
|
||||||
constexpr Utils::Version<int, 3, 2> API_VERSION {2, 6, 1};
|
constexpr Utils::Version<int, 3, 2> API_VERSION {2, 6, 2};
|
||||||
|
|
||||||
class APIController;
|
class APIController;
|
||||||
class WebApplication;
|
class WebApplication;
|
||||||
|
|||||||
Reference in New Issue
Block a user