From cc179e9ecfb61f25ce61e654faed516525a204df Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Tue, 19 Dec 2023 16:55:08 +0100 Subject: [PATCH] Metadata: Stack media files with the same "ContentIdentifier" #3960 Signed-off-by: Michael Mayer --- internal/meta/data.go | 2 +- internal/meta/json_test.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/meta/data.go b/internal/meta/data.go index 80aec0902..613931269 100644 --- a/internal/meta/data.go +++ b/internal/meta/data.go @@ -17,7 +17,7 @@ const ( type Data struct { FileName string `meta:"FileName"` MimeType string `meta:"MIMEType" report:"-"` - DocumentID string `meta:"BurstUUID,MediaGroupUUID,ImageUniqueID,OriginalDocumentID,DocumentID,DigitalImageGUID"` + DocumentID string `meta:"ContentIdentifier,MediaGroupUUID,BurstUUID,OriginalDocumentID,DocumentID,ImageUniqueID,DigitalImageGUID"` // see https://exiftool.org/forum/index.php?topic=14874.0 InstanceID string `meta:"InstanceID,DocumentID"` CreatedAt time.Time `meta:"SubSecCreateDate,CreationDate,CreateDate,MediaCreateDate,ContentCreateDate,TrackCreateDate"` TakenAt time.Time `meta:"SubSecDateTimeOriginal,SubSecDateTimeCreated,DateTimeOriginal,CreationDate,DateTimeCreated,DateTime,DateTimeDigitized" xmp:"DateCreated"` diff --git a/internal/meta/json_test.go b/internal/meta/json_test.go index c3bc3f55e..8867ec956 100644 --- a/internal/meta/json_test.go +++ b/internal/meta/json_test.go @@ -765,6 +765,7 @@ func TestJSON(t *testing.T) { assert.Equal(t, "Apple", data.CameraMake) assert.Equal(t, "iPhone X", data.CameraModel) assert.Equal(t, "", data.LensModel) + assert.Equal(t, "ca20385d-6106-49c9-acf5-2f8098f4b390", data.DocumentID) }) t.Run("aurora.jpg.json", func(t *testing.T) { @@ -1294,6 +1295,7 @@ func TestJSON(t *testing.T) { assert.Equal(t, "Apple", data.CameraMake) assert.Equal(t, "iPhone 14 Pro Max", data.CameraModel) assert.Equal(t, "iPhone 14 Pro Max back triple camera 9mm f/2.8", data.LensModel) + assert.Equal(t, "e5f10d35-06c3-4f75-a00c-50b793a6c325", data.DocumentID) }) t.Run("buggy_panorama.json", func(t *testing.T) {