mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
update
This commit is contained in:
@@ -438,6 +438,7 @@ void JsonClientConnection::handleEffectCommand(const QJsonObject& message, const
|
||||
// extract parameters
|
||||
int priority = message["priority"].toInt();
|
||||
int duration = message["duration"].toInt(-1);
|
||||
QString origin = message["origin"].toString();
|
||||
QString pythonScript = message["pythonScript"].toString("");
|
||||
const QJsonObject & effect = message["effect"].toObject();
|
||||
const QString & effectName = effect["name"].toString();
|
||||
@@ -445,11 +446,11 @@ void JsonClientConnection::handleEffectCommand(const QJsonObject& message, const
|
||||
// set output
|
||||
if (effect.contains("args"))
|
||||
{
|
||||
_hyperion->setEffect(effectName, effect["args"].toObject(), priority, duration, pythonScript);
|
||||
_hyperion->setEffect(effectName, effect["args"].toObject(), priority, duration, pythonScript, origin);
|
||||
}
|
||||
else
|
||||
{
|
||||
_hyperion->setEffect(effectName, priority, duration);
|
||||
_hyperion->setEffect(effectName, priority, duration, origin);
|
||||
}
|
||||
|
||||
// send reply
|
||||
|
@@ -20,6 +20,10 @@
|
||||
"type": "integer",
|
||||
"required": false
|
||||
},
|
||||
"origin": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"effect": {
|
||||
"type": "object",
|
||||
"required": true,
|
||||
|
Reference in New Issue
Block a user