mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-18 09:04:28 +03:00
List face files by creation time
This commit is contained in:
parent
91c6618cab
commit
744aac7473
@ -31,7 +31,10 @@ def get_faces():
|
|||||||
if not os.path.isdir(face_dir):
|
if not os.path.isdir(face_dir):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
for file in os.listdir(face_dir):
|
for file in sorted(
|
||||||
|
os.listdir(face_dir),
|
||||||
|
key=lambda f: os.path.getctime(os.path.join(face_dir, f)),
|
||||||
|
):
|
||||||
face_dict[name].append(file)
|
face_dict[name].append(file)
|
||||||
|
|
||||||
return JSONResponse(status_code=200, content=face_dict)
|
return JSONResponse(status_code=200, content=face_dict)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user