Fix Nitro soundboard URLs and CMS gamedata paths
CI / check (push) Successful in 38s
CI / tests-integration (push) Successful in 2m3s
CI / tests-imaging-browsers (push) Successful in 3m1s
CI / tests-quality (push) Successful in 1m27s
CI / tests-unit (push) Successful in 4m41s
CI / tests-ui (push) Successful in 5m30s
CI / preflight (push) Skipped
CI / deploy (push) Successful in 3m50s

This commit is contained in:
openhands committed 2026-10-24 18:22:10 +02:00
1 parent 9560ddc212
commit 836defd0c1
2 files changed
+46

No files matched your search

+16
View File
@@ -84,6 +84,22 @@ function applyOverrides(data) {
data["soundboard.url"] =
`${gamedata}/config/soundboard-sounds.jsonc?t=%timestamp%`;
}
if (gamedata) {
const soundboardDefaults = {
"soundboard.manifest.url": `${gamedata}/config/SoundData.json?t=%timestamp%`,
"soundboard.sounds.url": `${gamedata}/config/soundboard-sounds.jsonc?t=%timestamp%`,
"soundboard.layout.url": `${gamedata}/config/soundboard-layout.jsonc?t=%timestamp%`,
};
for (const [key, value] of Object.entries(soundboardDefaults)) {
if (
!(key in data) ||
isPlaceholder(data[key]) ||
data[key] === "configuration/soundboard-layout.jsonc"
) {
data[key] = value;
}
}
}
// Never force ads on/off over a hotel's own choice; only default to "off"
// when the key does not exist yet (prevents external ad scripts from 404ing).
if (!("show.google.ads" in data)) data["show.google.ads"] = false;