mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Instance names can now be renamed on the WebUI (incl. inst 0)
Signed-off-by: Paulchen-Panther <Paulchen-Panter@protonmail.com>
This commit is contained in:
@@ -1298,9 +1298,16 @@ void JsonAPI::handleInstanceCommand(const QJsonObject & message, const QString &
|
||||
|
||||
if(subc == "saveName")
|
||||
{
|
||||
// silent fail
|
||||
_instanceManager->saveName(inst,name);
|
||||
sendSuccessReply(command+"-"+subc, tan);
|
||||
if(_userAuthorized)
|
||||
{
|
||||
// silent fail
|
||||
if(_instanceManager->saveName(inst,name))
|
||||
sendSuccessReply(command+"-"+subc, tan);
|
||||
else
|
||||
sendErrorReply(QString("The instance name '%1' is already in use").arg(name), command+"-"+subc, tan);
|
||||
}
|
||||
else
|
||||
sendErrorReply("No Authorization",command+"-"+subc, tan);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user