mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-05 18:55:23 +03:00
Fix audio events not being ended correctly
This commit is contained in:
parent
ad3d43f0b1
commit
016ade809e
@ -209,7 +209,6 @@ class AudioEventMaintainer(threading.Thread):
|
||||
now - detection.get("last_detection", now)
|
||||
> self.config.audio.max_not_heard
|
||||
):
|
||||
self.detections[detection["label"]] = None
|
||||
requests.put(
|
||||
f"{FRIGATE_LOCALHOST}/api/events/{detection['id']}/end",
|
||||
json={
|
||||
@ -217,6 +216,7 @@ class AudioEventMaintainer(threading.Thread):
|
||||
+ self.config.record.events.post_capture
|
||||
},
|
||||
)
|
||||
self.detections[detection["label"]] = None
|
||||
|
||||
def restart_audio_pipe(self) -> None:
|
||||
try:
|
||||
|
||||
@ -239,6 +239,6 @@ class EventProcessor(threading.Thread):
|
||||
}
|
||||
|
||||
try:
|
||||
Event.update(event).execute()
|
||||
except Exception:
|
||||
logger.warning(f"Failed to update manual event: {event_data['id']}")
|
||||
Event.update(event).where(Event.id == event_data["id"]).execute()
|
||||
except Exception as e:
|
||||
logger.warning(f"Failed to update manual event: {event_data['id']} :: {e}")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user