From 86f9b1f6db0b212b8df32433a788f69c23e879be Mon Sep 17 00:00:00 2001 From: Jesse Chan Date: Mon, 30 Nov 2020 20:27:57 +0800 Subject: [PATCH 1/2] WebAPI: allow to attach tags while adding torrents --- src/webui/api/torrentscontroller.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/webui/api/torrentscontroller.cpp b/src/webui/api/torrentscontroller.cpp index 0ca427db3..28fe6ab03 100644 --- a/src/webui/api/torrentscontroller.cpp +++ b/src/webui/api/torrentscontroller.cpp @@ -567,6 +567,7 @@ void TorrentsController::addAction() const TriStateBool rootFolder = parseTriStateBool(params()["root_folder"]); const QString savepath = params()["savepath"].trimmed(); const QString category = params()["category"]; + const QSet tags = List::toSet(params()["tags"].split(',', QString::SkipEmptyParts)); const QString cookie = params()["cookie"]; const QString torrentName = params()["rename"].trimmed(); const int upLimit = params()["upLimit"].toInt(); @@ -599,6 +600,7 @@ void TorrentsController::addAction() params.createSubfolder = rootFolder; params.savePath = savepath; params.category = category; + params.tags = tags; params.name = torrentName; params.uploadLimit = (upLimit > 0) ? upLimit : -1; params.downloadLimit = (dlLimit > 0) ? dlLimit : -1; From d0d5af8c6629a226414e5b8f15aa33bb230b94b6 Mon Sep 17 00:00:00 2001 From: Jesse Chan Date: Tue, 1 Dec 2020 01:43:03 +0800 Subject: [PATCH 2/2] WebAPI: bump version to 2.6.2 --- src/webui/webapplication.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webui/webapplication.h b/src/webui/webapplication.h index da7ba12ff..efc5de649 100644 --- a/src/webui/webapplication.h +++ b/src/webui/webapplication.h @@ -43,7 +43,7 @@ #include "base/utils/net.h" #include "base/utils/version.h" -constexpr Utils::Version API_VERSION {2, 6, 1}; +constexpr Utils::Version API_VERSION {2, 6, 2}; class APIController; class WebApplication;