From 32fcd43801e5c723afe3778cf2399efda5b411e0 Mon Sep 17 00:00:00 2001 From: tian <11429339@qq.com> Date: Mon, 20 Jul 2026 15:01:31 +0800 Subject: [PATCH] fix: actionFaceGalleryAdd now registers person/photo in SQLite DB --- internal/web/ui.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/web/ui.go b/internal/web/ui.go index 6ad32f7..1054fc2 100644 --- a/internal/web/ui.go +++ b/internal/web/ui.go @@ -5299,6 +5299,12 @@ func (u *UI) actionFaceGalleryAdd(w http.ResponseWriter, r *http.Request) { } defer f.Close() io.Copy(f, file) + // Register person and photo in DB so the face gallery list reflects it. + if strings.TrimSpace(u.dbPath) != "" { + repo := storage.NewFaceGalleryRepo(u.dbPath) + pid, _ := repo.FindOrCreatePerson(name) + _ = repo.AddPhoto(pid, name+"/"+hdr.Filename) + } http.Redirect(w, r, "/ui/face-gallery?msg=ok", http.StatusFound) }