feat(server): Merge Faces sorted by Similarity (#14635)

* Merge Faces sorted by Similarity

* Adds face sorting to the side panel face merger

* run make open-api

* Make it one query

* Only have the single order by when sorting by closest face
This commit is contained in:
Lukas 2024-12-16 09:47:11 -05:00 committed by GitHub
parent 8945a5d862
commit 12e55f5bf0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 136 additions and 44 deletions

View file

@ -8,7 +8,6 @@
import { getPersonNameWithHiddenValue } from '$lib/utils/person';
import {
createPerson,
getAllPeople,
getFaces,
reassignFacesById,
AssetTypeEnum,
@ -53,7 +52,6 @@
// search people
let showSelectedFaces = $state(false);
let allPeople: PersonResponseDto[] = $state([]);
// timers
let loaderLoadingDoneTimeout: ReturnType<typeof setTimeout>;
@ -64,8 +62,6 @@
async function loadPeople() {
const timeout = setTimeout(() => (isShowLoadingPeople = true), timeBeforeShowLoadingSpinner);
try {
const { people } = await getAllPeople({ withHidden: true });
allPeople = people;
peopleWithFaces = await getFaces({ id: assetId });
} catch (error) {
handleError(error, $t('errors.cant_get_faces'));
@ -322,7 +318,6 @@
{#if showSelectedFaces && editedFace}
<AssignFaceSidePanel
{allPeople}
{editedFace}
{assetId}
{assetType}