Skip to content

Commit

Permalink
Merge pull request qbittorrent#13882 from jesec/master
Browse files Browse the repository at this point in the history
WebAPI: allow to attach tags while adding torrents
  • Loading branch information
glassez authored Dec 1, 2020
1 parent 3c7fe1e commit 62587d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/webui/api/torrentscontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<QString> 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();
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/webui/webapplication.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#include "base/utils/net.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 WebApplication;
Expand Down

0 comments on commit 62587d6

Please sign in to comment.