Batch: Perform priority comparison after resolving the PhotoLabel #271

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2025-11-22 10:31:50 +01:00
parent 6e0416db34
commit cca86c08c7

View File

@@ -110,8 +110,10 @@ func ApplyLabels(photo *entity.Photo, labels Items) (errs []error) {
continue
}
labelIndex[labelEntity.ID] = pl
} else if entity.SrcPriority[pl.LabelSrc] > entity.SrcPriority[entity.SrcBatch] {
// Keep existing label with higher priority.
}
// Keep existing label with higher priority than batch updates, even if it wasn't preloaded.
if entity.SrcPriority[pl.LabelSrc] > entity.SrcPriority[entity.SrcBatch] {
continue
}