mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-15 15:45:27 +03:00
Fix media apis
This commit is contained in:
parent
6951054f03
commit
1159b4e0f2
@ -917,7 +917,7 @@ def grid_snapshot(
|
||||
ret, jpg = cv2.imencode(".jpg", frame, [int(cv2.IMWRITE_JPEG_QUALITY), 70])
|
||||
|
||||
return Response(
|
||||
jpg.tobytes,
|
||||
jpg.tobytes(),
|
||||
media_type="image/jpeg",
|
||||
headers={"Cache-Control": "no-store"},
|
||||
)
|
||||
@ -1453,7 +1453,6 @@ def preview_thumbnail(file_name: str):
|
||||
|
||||
return Response(
|
||||
jpg_bytes,
|
||||
# FIXME: Shouldn't it be either jpg or webp depending on the endpoint?
|
||||
media_type="image/webp",
|
||||
headers={
|
||||
"Content-Type": "image/webp",
|
||||
@ -1482,7 +1481,7 @@ def label_thumbnail(request: Request, camera_name: str, label: str):
|
||||
ret, jpg = cv2.imencode(".jpg", frame, [int(cv2.IMWRITE_JPEG_QUALITY), 70])
|
||||
|
||||
return Response(
|
||||
jpg.tobytes,
|
||||
jpg.tobytes(),
|
||||
media_type="image/jpeg",
|
||||
headers={"Cache-Control": "no-store"},
|
||||
)
|
||||
@ -1535,6 +1534,6 @@ def label_snapshot(request: Request, camera_name: str, label: str):
|
||||
_, jpg = cv2.imencode(".jpg", frame, [int(cv2.IMWRITE_JPEG_QUALITY), 70])
|
||||
|
||||
return Response(
|
||||
jpg.tobytes,
|
||||
jpg.tobytes(),
|
||||
media_type="image/jpeg",
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user