diff --git a/frigate/events/audio.py b/frigate/events/audio.py index b0c55c3a3..164c9c62d 100644 --- a/frigate/events/audio.py +++ b/frigate/events/audio.py @@ -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: diff --git a/frigate/events/maintainer.py b/frigate/events/maintainer.py index f024f0be6..0b2612f4f 100644 --- a/frigate/events/maintainer.py +++ b/frigate/events/maintainer.py @@ -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}")