Overlay reloads itself after a deploy (boot ID), versioned asset URLs
OBS kept running the old alert scripts after a deploy, so TTS redeems fell back to the cassette with no voice. The server now sends a boot ID on every WebSocket connect; an overlay built with a different ID reloads itself. Asset URLs carry ?v=<boot ID> so the reload never uses cached files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
9e356b0875
commit
5f61b1ebe1
4 changed files with 30 additions and 16 deletions
|
|
@ -1,6 +1,7 @@
|
|||
const express = require('express');
|
||||
const router = express.Router();
|
||||
const db = require('../db');
|
||||
const ws = require('../ws');
|
||||
|
||||
// Parts of the overlay. One OBS browser source can show all of them, or the overlay can be split into
|
||||
// several sources with ?parts=, e.g. chat in its own source (audio "Monitor Only" in OBS, so chat
|
||||
|
|
@ -32,7 +33,7 @@ router.get('/:uuid', (req, res) => {
|
|||
const settings = db.getOverlaySettings();
|
||||
if (req.params.uuid !== settings.overlay_id) return res.status(404).send('Overlay not found');
|
||||
res.render('overlay', { layout: false, settings, parts: partsFrom(req.query.parts),
|
||||
chatBox: chatBoxFrom(req.query.chat), chatFlow: req.query.chatflow === 'up' ? 'up' : 'down' });
|
||||
chatBox: chatBoxFrom(req.query.chat), chatFlow: req.query.chatflow === 'up' ? 'up' : 'down', boot: ws.BOOT_ID });
|
||||
});
|
||||
|
||||
module.exports = router;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue