Skip to content

Commit

Permalink
Formatted with ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
Vader committed Mar 2, 2024
1 parent 2647517 commit 371166f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frigate/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -863,10 +863,13 @@ def label_thumbnail(camera_name, label):
response.headers["Cache-Control"] = "no-store"
return response


@bp.route("/<camera_name>/<label>/clip.mp4")
def label_clip(camera_name, label):
label = unquote(label)
event_query = Event.select(fn.MAX(Event.id)).where(Event.camera == camera_name, Event.has_clip == True)
event_query = Event.select(fn.MAX(Event.id)).where(
Event.camera == camera_name, Event.has_clip == True
)
if label != "any":
event_query = event_query.where(Event.label == label)

Expand Down

0 comments on commit 371166f

Please sign in to comment.