From cca86c08c74d3f0c49f5055cd8e02228b2b0f8cc Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Sat, 22 Nov 2025 10:31:50 +0100 Subject: [PATCH] Batch: Perform priority comparison after resolving the PhotoLabel #271 Signed-off-by: Michael Mayer --- internal/photoprism/batch/apply_labels.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/photoprism/batch/apply_labels.go b/internal/photoprism/batch/apply_labels.go index ba29aebca..651997cb2 100644 --- a/internal/photoprism/batch/apply_labels.go +++ b/internal/photoprism/batch/apply_labels.go @@ -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 }