mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Merge branch 'master' into mediafoundation
This commit is contained in:
commit
38e133171f
@ -89,11 +89,13 @@ function loadContent(event, forceRefresh) {
|
|||||||
|
|
||||||
var lastSelectedInstance = getStorage('lastSelectedInstance', false);
|
var lastSelectedInstance = getStorage('lastSelectedInstance', false);
|
||||||
|
|
||||||
if (lastSelectedInstance && (lastSelectedInstance != window.currentHyperionInstance))
|
if (lastSelectedInstance && (lastSelectedInstance != window.currentHyperionInstance)) {
|
||||||
if (typeof (window.serverInfo.instance[lastSelectedInstance].running) !== 'undefined' && window.serverInfo.instance[lastSelectedInstance].running)
|
if (window.serverInfo.instance[lastSelectedInstance] && window.serverInfo.instance[lastSelectedInstance].running) {
|
||||||
instanceSwitch(lastSelectedInstance);
|
instanceSwitch(lastSelectedInstance);
|
||||||
else
|
} else {
|
||||||
removeStorage('lastSelectedInstance', false);
|
removeStorage('lastSelectedInstance', false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (typeof event != "undefined") {
|
if (typeof event != "undefined") {
|
||||||
tag = event.currentTarget.hash;
|
tag = event.currentTarget.hash;
|
||||||
@ -181,7 +183,6 @@ function initLanguageSelection() {
|
|||||||
langText = availLangText[langIdx];
|
langText = availLangText[langIdx];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#language-select').prop('title', langText);
|
$('#language-select').prop('title', langText);
|
||||||
$("#language-select").val(langIdx);
|
$("#language-select").val(langIdx);
|
||||||
$("#language-select").selectpicker("refresh");
|
$("#language-select").selectpicker("refresh");
|
||||||
|
@ -42,7 +42,7 @@ public:
|
|||||||
/// @brief get the full settings object of this instance (with global settings)
|
/// @brief get the full settings object of this instance (with global settings)
|
||||||
/// @return The requested json
|
/// @return The requested json
|
||||||
///
|
///
|
||||||
const QJsonObject & getSettings() const { return _qconfig; }
|
QJsonObject getSettings() const;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
///
|
///
|
||||||
|
@ -114,6 +114,25 @@ QJsonDocument SettingsManager::getSetting(settings::type type) const
|
|||||||
return _sTable->getSettingsRecord(settings::typeToString(type));
|
return _sTable->getSettingsRecord(settings::typeToString(type));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QJsonObject SettingsManager::getSettings() const
|
||||||
|
{
|
||||||
|
QJsonObject config;
|
||||||
|
for(const auto & key : _qconfig.keys())
|
||||||
|
{
|
||||||
|
//Read all records from database to ensure that global settings are read across instances
|
||||||
|
QJsonDocument doc = _sTable->getSettingsRecord(key);
|
||||||
|
if(doc.isArray())
|
||||||
|
{
|
||||||
|
config.insert(key, doc.array());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
config.insert(key, doc.object());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return config;
|
||||||
|
}
|
||||||
|
|
||||||
bool SettingsManager::saveSettings(QJsonObject config, bool correct)
|
bool SettingsManager::saveSettings(QJsonObject config, bool correct)
|
||||||
{
|
{
|
||||||
// optional data upgrades e.g. imported legacy/older configs
|
// optional data upgrades e.g. imported legacy/older configs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user