Face rec: only consider webp files

This commit is contained in:
leccelecce
2025-03-19 10:13:01 +00:00
parent 5514fc11b9
commit e1b630b6ad
2 changed files with 2 additions and 2 deletions

View File

@@ -39,7 +39,7 @@ def get_faces():
face_dict[name] = []
for file in sorted(
os.listdir(face_dir),
filter(lambda f: (f.endswith(".webp")), os.listdir(face_dir)),
key=lambda f: os.path.getctime(os.path.join(face_dir, f)),
reverse=True,
):

View File

@@ -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,
)