frigate/frigate/api
Josh Hawkins d73f28807f ensure previews dir exists
when ffmpeg processes restart, there's a brief window where the preview frame generation pipeline is torn down and restarted. before these changes, ffmpeg only restarted on crash/stall recovery or full Frigate restart. Now that ffmpeg restarts happen on-demand via config changes, there's a higher chance a frontend request hits the preview_mp4 or preview_gif endpoints during that brief restart window when the directory might not exist yet. The existing os.listdir() call would throw FileNotFoundError without a directory existence check. this fix just checks if the directory exists and returns 404 if not, exactly how preview_thumbnail already handles the same scenario a few lines below
2026-03-04 12:53:49 -06:00
..
defs Debug replay (#22212) 2026-03-04 10:07:34 -06:00
__init__.py Update flask and restructure into api folder with apis put into separate folders (#10193) 2024-03-02 22:10:37 +00:00
app.py fix rebase issue 2026-03-04 11:07:11 -06:00
auth.py Cleanup 2026-02-26 21:27:56 -07:00
camera.py Miscellaneous fixes (0.17 beta) (#21655) 2026-01-15 07:08:49 -07:00
chat.py Add GenAI Backend Streaming and Chat (#22152) 2026-02-27 09:07:30 -07:00
classification.py Add languages (#21870) 2026-02-03 13:29:52 -06:00
debug_replay.py Debug replay (#22212) 2026-03-04 10:07:34 -06:00
event.py Allow API Events to be Detections or Alerts, depending on the Event Label (#21923) 2026-02-26 21:27:56 -07:00
export.py Refactor Time-Lapse Export (#21668) 2026-02-26 21:27:56 -07:00
fastapi_app.py Debug replay (#22212) 2026-03-04 10:07:34 -06:00
media.py ensure previews dir exists 2026-03-04 12:53:49 -06:00
notification.py API admin exemptions and route guard updates (#21094) 2025-11-29 07:30:04 -06:00
preview.py Miscellaneous Fixes (#21241) 2025-12-12 07:45:03 -06:00
record.py Add API to handle deleting recordings (#21520) 2026-02-26 21:27:56 -07:00
review.py Add support for multiple GenAI Providers (#22144) 2026-02-27 08:35:33 -07:00