Compare commits

..

3 commits

Author SHA1 Message Date
5c3c85edc6 package: Create new release
All checks were successful
/ deploy (push) Successful in -2040h37m34s
2024-04-06 15:00:28 +00:00
d714a56db3 encoder: Add date text support in encoder command
All checks were successful
/ deploy (push) Successful in -2040h37m40s
2024-04-06 14:59:27 +00:00
91e7395046 Automatically refresh app when version updates
All checks were successful
/ deploy (push) Successful in -2040h37m48s
2024-02-25 22:01:37 +00:00
5 changed files with 11 additions and 2 deletions

View file

@ -169,6 +169,7 @@ class EncoderManager {
}
command = command.replace('-f decklink ', `${settings.format_code} -f decklink ${settings.device} `)
}
command = command.replace('$date$', new Date().toISOString().replace('T','_').replace(/:/g,'').split('.')[0])
let process = await runCommand('', command, this.fromEncoder.bind(this), true)
this.attempting.value = process

View file

@ -3,6 +3,10 @@ import serial from '../serial/serial.mjs'
import encoder from '../encoder/encoder.mjs'
export default class HealthRoutes {
constructor(opts = {}) {
Object.assign(this, opts)
}
registerGlobalIo(io, server) {
effect(() => {
io.io.emit('status', this.getStatus())
@ -19,6 +23,7 @@ export default class HealthRoutes {
getStatus() {
return {
version: this.version,
serial_running: Boolean(serial.serial.value),
serial_display: serial.currentDisplay.value,
encoder_running: Boolean(encoder.encoder.value),

View file

@ -29,7 +29,7 @@ export default class Server {
static: new StaticRoutes(),
encoder: new EncoderRoutes(),
serial: new SerialRoutes(),
health: new HealthRoutes(),
health: new HealthRoutes({ version: this.core.version }),
serve: new ServeHandler({
root: localUtil.getPathFromRoot('../public'),
version: this.core.version,

View file

@ -16,6 +16,9 @@ class Client {
this.status = {}
this.socket.on('status', status => {
if (this.status.version && status?.version && this.status.version !== status.version) {
window.location.reload(true)
}
this.status = status
})
this.socket.on('disconnect', this.disconnected.bind(this))

View file

@ -1,6 +1,6 @@
{
"name": "church_streamer",
"version": "1.0.2",
"version": "1.0.4",
"description": "",
"main": "index.mjs",
"scripts": {