feat: stream-events log — track title/game changes during live recording
Sibling .events.jsonl alongside each live recording. Default-on because the cost is one Helix/GQL hit per minute per active recording — trivial — and the value is real: when seeking inside a 6h archived stream, "at minute 142 he switched from Just Chatting to Counter-Strike" is exactly the kind of thing you want answered. Server: - new LiveEventTracker (one per active live recording, keyed by queue item id). Holds an open file descriptor for the .events.jsonl output, last-seen title + game, recording start timestamp. - start writes a recording_start line with the initial Helix metadata snapshot. Stop writes a recording_end line with duration + success flag + error message if any. - Background pollLiveEventsForChanges fires every 60s while at least one tracker is active (timer auto-stops when the last recording ends so an idle app pays nothing). Per tracker, hits getLiveStreamInfo, compares against the cached title/game, emits title_change / game_change lines on diff. Game changes also trigger a Discord webhook ping when the user has the live-start notification enabled — game flips matter more than title micro- edits, so we only ping for game. - JSON Lines format like the chat capture file — a kill mid-stream preserves prior data, no need to rewrite. Wire-up: - downloadLiveStream starts the tracker after the chat session is spun up but before streamlink launches, so the recording_start line lands first. Stops it after streamlink exits with the result.success flag carried into recording_end. The .events.jsonl path is added to outputFiles when it exists so the renderer's Open file / Show in folder UI lists it alongside the video and chat file. Renderer / settings: - new log_stream_events: boolean (default true — it's cheap). Settings -> Download card gets a toggle with hint explaining the Helix-call-per-minute trade-off. - AppConfig type, autosave fingerprint, syncSettingsForm, applyLanguageToStaticUI, locale strings DE + EN. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
cd5c4daccf
commit
55434f499d
@@ -535,6 +535,10 @@
|
||||
<input type="checkbox" id="captureLiveChatToggle">
|
||||
<span id="captureLiveChatLabel">Live-Chat waehrend der Aufnahme mitschneiden (.chat.jsonl)</span>
|
||||
</label>
|
||||
<label style="display:flex; align-items:center; gap:8px; margin-top: 8px;">
|
||||
<input type="checkbox" id="logStreamEventsToggle" checked>
|
||||
<span id="logStreamEventsLabel">Stream-Events bei Live-Aufnahmen mitloggen (.events.jsonl)</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label id="metadataCacheMinutesLabel">Metadata-Cache (Minuten)</label>
|
||||
|
||||
Reference in New Issue
Block a user