mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-05 10:45:21 +03:00
Fix audio events not being ended
This commit is contained in:
parent
7ee17c7af8
commit
ad3d43f0b1
@ -202,11 +202,14 @@ class AudioEventMaintainer(threading.Thread):
|
||||
now = datetime.datetime.now().timestamp()
|
||||
|
||||
for detection in self.detections.values():
|
||||
if not detection:
|
||||
continue
|
||||
|
||||
if (
|
||||
now - detection.get("last_detection", now)
|
||||
> self.config.audio.max_not_heard
|
||||
):
|
||||
del self.detections[detection["label"]]
|
||||
self.detections[detection["label"]] = None
|
||||
requests.put(
|
||||
f"{FRIGATE_LOCALHOST}/api/events/{detection['id']}/end",
|
||||
json={
|
||||
|
||||
Loading…
Reference in New Issue
Block a user