mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-05-30 01:16:42 +02:00
Face rec: only consider webp files in /faces and handle_request (#17244)
* Face rec: only consider webp files * Allow png/jpg/jpeg as well as webp
This commit is contained in:
parent
ac9e24e2ed
commit
dda7be99eb
@ -39,7 +39,10 @@ def get_faces():
|
||||
face_dict[name] = []
|
||||
|
||||
for file in sorted(
|
||||
os.listdir(face_dir),
|
||||
filter(
|
||||
lambda f: (f.lower().endswith((".webp", ".png", ".jpg", ".jpeg"))),
|
||||
os.listdir(face_dir),
|
||||
),
|
||||
key=lambda f: os.path.getctime(os.path.join(face_dir, f)),
|
||||
reverse=True,
|
||||
):
|
||||
|
@ -484,7 +484,7 @@ class FaceRealTimeProcessor(RealTimeProcessorApi):
|
||||
shutil.move(current_file, new_file)
|
||||
|
||||
files = sorted(
|
||||
os.listdir(folder),
|
||||
filter(lambda f: (f.endswith(".webp")), os.listdir(folder)),
|
||||
key=lambda f: os.path.getctime(os.path.join(folder, f)),
|
||||
reverse=True,
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user