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.
This commit is contained in:
Josh Hawkins
2026-09-18 06:55:36 -05:00
parent 605d051b3d
commit ee35be19ac
+2 -3
View File
@@ -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()