fix: Docker volume path, graceful shutdown deadline, inline stream headers

docker-compose.yml: mount ./recordings at /app/recordings (matches
output_directory = recordings in config.ini); previously the recorder
wrote to /app/recordings while the web container read from /recordings,
causing all files to appear missing — explaining the 9-byte Not-found
download from /stream/ and the 0-byte recordings in the UI.
Add stop_grace_period: 30s so Docker waits long enough for files to close.

isr.py: replace per-thread join(timeout=5) with a shared 25 s deadline;
with N recorders the old code could exceed Docker's SIGKILL window and
leave WAV/FLAC files unclosed (corrupt headers).

web.py: add Content-Disposition: inline to /stream/ responses so
browsers never treat the audio response as a file download.

CLAUDE.md: document web.py endpoints, status.json lifecycle, corrected
Docker volume layout, and web.py CLI flags.
This commit is contained in:
2026-04-26 13:10:14 +02:00
parent 624f1f2664
commit da67523170
4 changed files with 26 additions and 7 deletions
+2
View File
@@ -337,6 +337,7 @@ class _Handler(BaseHTTPRequestHandler):
self.send_response(206)
self.send_header('Content-Type', content_type)
self.send_header('Content-Disposition', f'inline; filename="{path.name}"')
self.send_header('Content-Range', f'bytes {start}-{end}/{size}')
self.send_header('Content-Length', str(length))
self.send_header('Accept-Ranges', 'bytes')
@@ -354,6 +355,7 @@ class _Handler(BaseHTTPRequestHandler):
else:
self.send_response(200)
self.send_header('Content-Type', content_type)
self.send_header('Content-Disposition', f'inline; filename="{path.name}"')
self.send_header('Content-Length', str(size))
self.send_header('Accept-Ranges', 'bytes')
self.end_headers()