mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 15:27:54 +00:00
WebAPI: fix wrong key used for categories
Regression from 1c0f8b4289
.
Closes #15969.
PR #15988.
This commit is contained in:
parent
f44341a8e2
commit
d6e0164766
@ -503,6 +503,8 @@ void SyncController::maindataAction()
|
|||||||
{
|
{
|
||||||
const BitTorrent::CategoryOptions categoryOptions = session->categoryOptions(categoryName);
|
const BitTorrent::CategoryOptions categoryOptions = session->categoryOptions(categoryName);
|
||||||
QJsonObject category = categoryOptions.toJSON();
|
QJsonObject category = categoryOptions.toJSON();
|
||||||
|
// adjust it to be compatible with exisitng WebAPI
|
||||||
|
category[QLatin1String("savePath")] = category.take(QLatin1String("save_path"));
|
||||||
category.insert(QLatin1String("name"), categoryName);
|
category.insert(QLatin1String("name"), categoryName);
|
||||||
categories[categoryName] = category.toVariantMap();
|
categories[categoryName] = category.toVariantMap();
|
||||||
}
|
}
|
||||||
|
@ -1280,6 +1280,8 @@ void TorrentsController::categoriesAction()
|
|||||||
{
|
{
|
||||||
const BitTorrent::CategoryOptions categoryOptions = session->categoryOptions(categoryName);
|
const BitTorrent::CategoryOptions categoryOptions = session->categoryOptions(categoryName);
|
||||||
QJsonObject category = categoryOptions.toJSON();
|
QJsonObject category = categoryOptions.toJSON();
|
||||||
|
// adjust it to be compatible with exisitng WebAPI
|
||||||
|
category[QLatin1String("savePath")] = category.take(QLatin1String("save_path"));
|
||||||
category.insert(QLatin1String("name"), categoryName);
|
category.insert(QLatin1String("name"), categoryName);
|
||||||
categories[categoryName] = category;
|
categories[categoryName] = category;
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
#include "base/utils/net.h"
|
#include "base/utils/net.h"
|
||||||
#include "base/utils/version.h"
|
#include "base/utils/version.h"
|
||||||
|
|
||||||
inline const Utils::Version<int, 3, 2> API_VERSION {2, 8, 4};
|
inline const Utils::Version<int, 3, 2> API_VERSION {2, 8, 5};
|
||||||
|
|
||||||
class APIController;
|
class APIController;
|
||||||
class WebApplication;
|
class WebApplication;
|
||||||
|
Loading…
Reference in New Issue
Block a user