diff --git a/src/webui/api/synccontroller.cpp b/src/webui/api/synccontroller.cpp index 7a5be46eb..9171c2b41 100644 --- a/src/webui/api/synccontroller.cpp +++ b/src/webui/api/synccontroller.cpp @@ -503,6 +503,8 @@ void SyncController::maindataAction() { const BitTorrent::CategoryOptions categoryOptions = session->categoryOptions(categoryName); 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); categories[categoryName] = category.toVariantMap(); } diff --git a/src/webui/api/torrentscontroller.cpp b/src/webui/api/torrentscontroller.cpp index 2d9419066..b9e772332 100644 --- a/src/webui/api/torrentscontroller.cpp +++ b/src/webui/api/torrentscontroller.cpp @@ -1280,6 +1280,8 @@ void TorrentsController::categoriesAction() { const BitTorrent::CategoryOptions categoryOptions = session->categoryOptions(categoryName); 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); categories[categoryName] = category; } diff --git a/src/webui/webapplication.h b/src/webui/webapplication.h index 339d805a5..a6514fcaa 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" -inline const Utils::Version API_VERSION {2, 8, 4}; +inline const Utils::Version API_VERSION {2, 8, 5}; class APIController; class WebApplication;