Signed-off-by: faumaray <faumaray@gmail.com>
This commit is contained in:
faumaray committed 2026-07-25 23:44:42 +03:00
1 parent 9f06af6c80
commit 7975f2b38e
19 files changed
+2020 -747

No files matched your search

+9 -1
View File
@@ -4,6 +4,7 @@
#include <Types.hpp>
#include <filesystem>
#include <string>
#include <string_view>
namespace Echoion::Core
{
@@ -22,6 +23,12 @@ namespace Echoion::Core
[[nodiscard]] static Api::Result<Api::AppConfig>
loadFromFile(const std::filesystem::path& path);
// Parse, migrate, and normalize a complete JSON configuration. This
// is shared by file loading and live configuration updates so
// legacy fields have identical behavior through both entry points.
[[nodiscard]] static Api::Result<Api::AppConfig>
loadFromJson(std::string_view json);
// Save configuration to JSON file
[[nodiscard]] static Api::Result<void>
saveToFile(const std::filesystem::path& path,
@@ -34,7 +41,8 @@ namespace Echoion::Core
[[nodiscard]] static Api::AppConfig createDefaultConfig();
// Clamp/normalize values that carry hard limits after loading
// (e.g. the yt-dlp concurrency cap). Applied by loadFromFile.
// (e.g. the yt-dlp concurrency cap). Applied by all load/update
// paths.
static void normalize(Api::AppConfig& config);
};