mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-07 02:18:07 +01:00
Allow API Events to be Detections or Alerts, depending on the Event Label (#21923)
* - API created events will be alerts OR detections, depending on the event label, defaulting to alerts
- Indefinite API events will extend the recording segment until those events are ended
- API event start time is the actual start time, instead of having a pre-buffer of record.event_pre_capture
* Instead of checking for indefinite events on a camera before deciding if we should end the segment, only update last_detection_time and last_alert_time if frame_time is greater, which should have the same effect
* Add the ability to set a pre_capture number of seconds when creating a manual event via the API. Default behavior unchanged
* Remove unnecessary _publish_segment_start() call
* Formatting
* handle last_alert_time or last_detection_time being None when checking them against the frame_time
* comment manual_info["label"].split(": ")[0] for clarity
This commit is contained in:
7
docs/static/frigate-api.yaml
vendored
7
docs/static/frigate-api.yaml
vendored
@@ -3200,6 +3200,7 @@ paths:
|
||||
duration: 30
|
||||
include_recording: true
|
||||
draw: {}
|
||||
pre_capture: null
|
||||
responses:
|
||||
"200":
|
||||
description: Successful Response
|
||||
@@ -5002,6 +5003,12 @@ components:
|
||||
- type: "null"
|
||||
title: Draw
|
||||
default: {}
|
||||
pre_capture:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: "null"
|
||||
title: Pre Capture Seconds
|
||||
default: null
|
||||
type: object
|
||||
title: EventsCreateBody
|
||||
EventsDeleteBody:
|
||||
|
||||
Reference in New Issue
Block a user