fix: ensure manually tagged faces have proper source type (#16364)

immich-app/immich#16062 added manual face tagging and deletion, but did
not add a new 'SourceType'. The create faces would default to
'machine-learning' which is incorrect, and has the annoying downside
that they will be wiped when the 'Refresh Faces' job is run.

Handling of non-machine-learning faces was previously added in
immich-app/immich#6455. This PR simply extends it to the new manually
tagged faces.
This commit is contained in:
David Bourgault 2025-02-26 21:53:21 -05:00 committed by GitHub
parent 8fbd650483
commit 4b55888d16
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 63 additions and 6 deletions

View file

@ -8301,6 +8301,14 @@
"format": "uuid",
"type": "string"
},
"sourceType": {
"allOf": [
{
"$ref": "#/components/schemas/SourceType"
}
],
"default": "manual"
},
"width": {
"type": "integer"
},
@ -8317,6 +8325,7 @@
"imageHeight",
"imageWidth",
"personId",
"sourceType",
"width",
"x",
"y"
@ -11952,7 +11961,8 @@
"SourceType": {
"enum": [
"machine-learning",
"exif"
"exif",
"manual"
],
"type": "string"
},

View file

@ -529,6 +529,7 @@ export type AssetFaceCreateDto = {
imageHeight: number;
imageWidth: number;
personId: string;
sourceType: SourceType;
width: number;
x: number;
y: number;
@ -3453,7 +3454,8 @@ export enum AlbumUserRole {
}
export enum SourceType {
MachineLearning = "machine-learning",
Exif = "exif"
Exif = "exif",
Manual = "manual"
}
export enum AssetTypeEnum {
Image = "IMAGE",