mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Refactor LED-Device handling in UI and make element naming consistent
This commit is contained in:
@@ -391,12 +391,30 @@ bool SettingsManager::handleConfigUpgrade(QJsonObject& config)
|
||||
Warning(_log, "Instance [%u]: HwLedCount/Layout mismatch! Setting Hardware LED count to number of LEDs configured via layout", _instance);
|
||||
hwLedcount = layoutLedCount;
|
||||
newDeviceConfig["hardwareLedCount"] = hwLedcount;
|
||||
|
||||
config["device"] = newDeviceConfig;
|
||||
migrated = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (newDeviceConfig.contains("type"))
|
||||
{
|
||||
QString type = newDeviceConfig["type"].toString();
|
||||
if (type == "atmoorb" || type == "fadecandy" || type == "philipshue" )
|
||||
{
|
||||
if (newDeviceConfig.contains("output"))
|
||||
{
|
||||
newDeviceConfig["host"] = newDeviceConfig["output"].toString();
|
||||
newDeviceConfig.remove("output");
|
||||
migrated = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (migrated)
|
||||
{
|
||||
config["device"] = newDeviceConfig;
|
||||
Debug(_log, "LED-Device records migrated");
|
||||
}
|
||||
}
|
||||
|
||||
if (config.contains("grabberV4L2"))
|
||||
|
@@ -147,7 +147,6 @@
|
||||
"ledBlacklist": {
|
||||
"type": "array",
|
||||
"title": "conf_leds_layout_blacklist_rules_title",
|
||||
"minimum": 1,
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "object",
|
||||
|
Reference in New Issue
Block a user