Refactor Hyperion JSON-API (#1727)

This commit is contained in:
LordGrey
2024-05-08 22:06:32 +02:00
committed by GitHub
parent 94850d890a
commit cf287f5adb
64 changed files with 4203 additions and 2962 deletions

View File

@@ -125,7 +125,7 @@ void JsonConnection::setEffect(const QString &effectName, const QString & effect
if (effectArgs.size() > 0)
{
QJsonObject effObj;
if(!JsonUtils::parse("hyperion-remote-args", effectArgs, effObj, _log))
if(!JsonUtils::parse("hyperion-remote-args", effectArgs, effObj, _log).first)
{
throw std::runtime_error("Error in effect arguments, abort");
}
@@ -160,7 +160,7 @@ void JsonConnection::createEffect(const QString &effectName, const QString &effe
if (effectArgs.size() > 0)
{
QJsonObject effObj;
if(!JsonUtils::parse("hyperion-remote-args", effectScript, effObj, _log))
if(!JsonUtils::parse("hyperion-remote-args", effectScript, effObj, _log).first)
{
throw std::runtime_error("Error in effect arguments, abort");
}
@@ -440,7 +440,7 @@ void JsonConnection::setConfig(const QString &jsonString)
if (jsonString.size() > 0)
{
QJsonObject configObj;
if(!JsonUtils::parse("hyperion-remote-args", jsonString, configObj, _log))
if(!JsonUtils::parse("hyperion-remote-args", jsonString, configObj, _log).first)
{
throw std::runtime_error("Error in configSet arguments, abort");
}