Repository navigation
Agent: already show current file/segment even when not yet finished - #662
Merged
Merged
Conversation
…pensensor#482) With long segment durations, a stream's current segment was invisible in the recordings overview and timeline until rotation finalized it. The recorder inserts the segment's DB row at its first keyframe, so the read paths were hiding it behind the is_complete filter for the whole segment lifetime. Read-side changes: - get_recording_count()/get_recording_metadata_paginated() gain an include_in_progress opt-in that also matches incomplete rows while their start_time is fresh (2x the stream's segment_duration, schema default 900 s when the config row is missing), so zombie rows left behind by a killed writer thread self-expire out of the views. - GET /api/recordings opts in and exposes the live segment with in_progress: true, end_time/end_time_unix: null and a live elapsed duration; GET /api/recordings/:id reports the same. - Timeline segment and coverage queries include the live segment with an effective end of "now" and return in_progress per segment. - Playback of an unfinished segment fails fast with HTTP 409, since the MP4 moov atom only exists once the segment is finalized. - Batch-delete/retention/storage-cache callers keep passing false so a segment that is still being written is never touched mid-write. Web UI: a pulsing "Recording" state in the recordings grid/table with a live elapsed duration, a clear message instead of a broken modal when playing a live segment, and the timeline renders the live segment as a pulsing bar through "now" with a matching legend entry. Tests: unit coverage for the opt-in predicate, zombie self-expiry, the recordings-list contract, the playback 409 and timeline segment inclusion.
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #482
Agent-generated change from a maintainer-labeled issue. Review the diff and CI results before merging. Close the issue only when its acceptance criteria are complete.
DigitalOcean session:
lightnvr-public-issue-482-39052526134.