mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
* Handle Arrays & Objects differently * Fix UI error, if "last instance used" does not longer exist
This commit is contained in:
parent
77262adf3b
commit
9e281b2347
File diff suppressed because it is too large
Load Diff
@ -120,7 +120,15 @@ QJsonObject SettingsManager::getSettings() const
|
|||||||
for(const auto & key : _qconfig.keys())
|
for(const auto & key : _qconfig.keys())
|
||||||
{
|
{
|
||||||
//Read all records from database to ensure that global settings are read across instances
|
//Read all records from database to ensure that global settings are read across instances
|
||||||
config.insert(key, _sTable->getSettingsRecord(key).object());
|
QJsonDocument doc = _sTable->getSettingsRecord(key);
|
||||||
|
if(doc.isArray())
|
||||||
|
{
|
||||||
|
config.insert(key, doc.array());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
config.insert(key, doc.object());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
@ -245,5 +253,18 @@ bool SettingsManager::handleConfigUpgrade(QJsonObject& config)
|
|||||||
Debug(_log,"LED Layout migrated");
|
Debug(_log,"LED Layout migrated");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config.contains("grabberV4L2"))
|
||||||
|
{
|
||||||
|
QJsonObject newGrabberV4L2Config = config["grabberV4L2"].toObject();
|
||||||
|
|
||||||
|
if (newGrabberV4L2Config.contains("encoding_format"))
|
||||||
|
{
|
||||||
|
newGrabberV4L2Config.remove("encoding_format");
|
||||||
|
config["grabberV4L2"] = newGrabberV4L2Config;
|
||||||
|
migrated = true;
|
||||||
|
Debug(_log, "GrabberV4L2 Layout migrated");
|
||||||
|
}
|
||||||
|
}
|
||||||
return migrated;
|
return migrated;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user