mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-09-29 18:51:43 +02:00
fix(printers): cam wall — offline tile chip + don't kill shared
streams when one viewer closes
1) Offline tiles now show OFF (not LIVE)
CameraWall.modeByPrinter assigned 'live' to any visible printer
without considering status.connected, so a disconnected X1C wasted
a live-budget slot AND rendered the red LIVE chip on top of the
WifiOff placeholder. Disconnected printers now map to 'paused' and
don't decrement liveBudget — the existing WifiOff + Off chip
rendering takes over.
2) /camera/stop no longer kills other viewers' streams
The cam-wall tile, EmbeddedCameraViewer, and the /camera/:id popup
all subscribe to the same fan-out broadcaster for a printer.
/camera/stop used to unconditionally shutdown_broadcaster() + kill
every ffmpeg process for the printer, so closing the embedded viewer
while the cam-wall tile of the same printer was live force-killed
the source the tile was pulling from — the tile's <img> errored.
New get_subscriber_count(key) accessor in camera_fanout.py exposes
the broadcaster's subscriber list length. /camera/stop now reads
that first; when >= 1 subscriber is still attached, return
{stopped: 0, skipped: true} and leave the broadcaster + ffmpeg
processes alone. The leaving viewer's HTTP teardown still runs the
natural iter_subscriber.finally -> unsubscribe path, so its slot is
released; the broadcaster keeps serving the other viewers. Single-
viewer close still hits the immediate force-teardown (count is 0).
This commit is contained in:
@@ -207,6 +207,7 @@ const FR_COGNATES = [
|
||||
'Cancelling upload...', 'Backup in progress...', 'Searching directory...',
|
||||
'EC984C,#6CD4BC,A66EB9,D87694',
|
||||
'Proxy', 'Navigation', 'Budget', 'Commit', 'Designer',
|
||||
'Compact', // cam-wall status overlay mode — same word in French
|
||||
'ntfy, Pushover, Discord, etc.',
|
||||
'{{filament}} @ {{temp}}°C', // drying badge: filament code + universal °C
|
||||
];
|
||||
@@ -237,6 +238,7 @@ const IT_COGNATES = [
|
||||
'Hex: #{{hex}}',
|
||||
'EC984C,#6CD4BC,A66EB9,D87694',
|
||||
'Proxy', 'Designer',
|
||||
'Off', // cam-wall status overlay mode — common loanword in Italian UI
|
||||
'{{filament}} @ {{temp}}°C', // drying badge: filament code + universal °C
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user