From ee35be19aca7c5664f5c2d7969963bfe6dfbb5ac Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Thu, 17 Sep 2026 16:55:12 -0500 Subject: [PATCH] fix the has_clip self-heal for events with no recordings `vod_event` looked for a `(body, 404)` tuple, but `vod_ts` returns a `JSONResponse`, so the check never matched and an old event whose recordings are gone kept offering a clip that can't play. It now checks the response status code. --- frigate/api/media.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/frigate/api/media.py b/frigate/api/media.py index 6a15952b5e..452b3b6fb2 100644 --- a/frigate/api/media.py +++ b/frigate/api/media.py @@ -886,9 +886,8 @@ async def vod_event( # If the recordings are not found and the event started more than 5 minutes ago, set has_clip to false if ( event.start_time < datetime.now().timestamp() - 300 - and type(vod_response) is tuple - and len(vod_response) == 2 - and vod_response[1] == 404 + and isinstance(vod_response, JSONResponse) + and vod_response.status_code == 404 ): Event.update(has_clip=False).where(Event.id == event_id).execute()