mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Append led array to JsonAPI ServerInfo
Signed-off-by: Paulchen-Panther <Paulchen-Panter@protonmail.com>
This commit is contained in:
parent
af416ba5fc
commit
f7707bb2d0
@ -1,7 +1,7 @@
|
|||||||
# With Docker
|
# With Docker
|
||||||
If you are using [Docker](https://www.docker.com/), you can compile Hyperion inside a docker container. This keeps your system clean and with a simple script it's easy to use. Supported is also cross compiling for Raspberry Pi (Debian Stretch or higher). To compile Hyperion just execute one of the following commands.
|
If you are using [Docker](https://www.docker.com/), you can compile Hyperion inside a docker container. This keeps your system clean and with a simple script it's easy to use. Supported is also cross compiling for Raspberry Pi (Debian Stretch or higher). To compile Hyperion just execute one of the following commands.
|
||||||
|
|
||||||
The compiled binaries and packages will be available at the deploy folder next to the script
|
The compiled binaries and packages will be available at the deploy folder next to the script.<br/>
|
||||||
Note: call the script with `./docker-compile.sh -h` for more options
|
Note: call the script with `./docker-compile.sh -h` for more options
|
||||||
|
|
||||||
## Native compiling on Raspberry Pi
|
## Native compiling on Raspberry Pi
|
||||||
|
@ -565,6 +565,9 @@ void JsonAPI::handleServerInfoCommand(const QJsonObject& message, const QString&
|
|||||||
}
|
}
|
||||||
info["instance"] = instanceInfo;
|
info["instance"] = instanceInfo;
|
||||||
|
|
||||||
|
// add leds configs
|
||||||
|
info["leds"] = _hyperion->getSetting(settings::LEDS).array();
|
||||||
|
|
||||||
// BEGIN | The following entries are derecated but used to ensure backward compatibility with hyperion Classic remote control
|
// BEGIN | The following entries are derecated but used to ensure backward compatibility with hyperion Classic remote control
|
||||||
// TODO Output the real transformation information instead of default
|
// TODO Output the real transformation information instead of default
|
||||||
|
|
||||||
@ -683,7 +686,8 @@ void JsonAPI::handleServerInfoCommand(const QJsonObject& message, const QString&
|
|||||||
}
|
}
|
||||||
for(const auto & entry : subsArr)
|
for(const auto & entry : subsArr)
|
||||||
{
|
{
|
||||||
if(entry == "settings-update")
|
// config callbacks just if auth is set
|
||||||
|
if(entry == "settings-update" && !_authorized)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(!_jsonCB->subscribeFor(entry.toString()))
|
if(!_jsonCB->subscribeFor(entry.toString()))
|
||||||
@ -989,6 +993,7 @@ void JsonAPI::handleLedColorsCommand(const QJsonObject& message, const QString &
|
|||||||
_streaming_image_reply["command"] = command+"-imagestream-update";
|
_streaming_image_reply["command"] = command+"-imagestream-update";
|
||||||
_streaming_image_reply["tan"] = tan;
|
_streaming_image_reply["tan"] = tan;
|
||||||
connect(_hyperion, &Hyperion::currentImage, this, &JsonAPI::setImage, Qt::UniqueConnection);
|
connect(_hyperion, &Hyperion::currentImage, this, &JsonAPI::setImage, Qt::UniqueConnection);
|
||||||
|
_hyperion->update();
|
||||||
}
|
}
|
||||||
else if (subcommand == "imagestream-stop")
|
else if (subcommand == "imagestream-stop")
|
||||||
{
|
{
|
||||||
@ -996,7 +1001,6 @@ void JsonAPI::handleLedColorsCommand(const QJsonObject& message, const QString &
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sendErrorReply("unknown subcommand \""+subcommand+"\"",command,tan);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1032,7 +1036,6 @@ void JsonAPI::handleLoggingCommand(const QJsonObject& message, const QString &co
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sendErrorReply("unknown subcommand",command,tan);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1142,7 +1145,7 @@ void JsonAPI::handleAuthorizeCommand(const QJsonObject & message, const QString
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// accept token request
|
// accept/deny token request
|
||||||
if(subc == "answerRequest")
|
if(subc == "answerRequest")
|
||||||
{
|
{
|
||||||
const QString& id = message["id"].toString().trimmed();
|
const QString& id = message["id"].toString().trimmed();
|
||||||
|
Loading…
Reference in New Issue
Block a user