From da0b7d8e21cc7e2c265f7183912416eb519e2648 Mon Sep 17 00:00:00 2001 From: Martin Kampas Date: Tue, 5 Mar 2024 12:57:55 +0100 Subject: [PATCH] Allow for "xap" ns prefix instead of "xmp" --- src/backend/model/fileaccess/MetadataLoader.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/backend/model/fileaccess/MetadataLoader.ts b/src/backend/model/fileaccess/MetadataLoader.ts index 9aa0b34f..fd7364de 100644 --- a/src/backend/model/fileaccess/MetadataLoader.ts +++ b/src/backend/model/fileaccess/MetadataLoader.ts @@ -170,6 +170,10 @@ export class MetadataLoader { } } } + if (Object.hasOwn(sidecarData, 'xap')) { + (sidecarData as any)['xmp'] = (sidecarData as any)['xap']; + delete (sidecarData as any)['xap']; + } if ((sidecarData as SideCar).xmp !== undefined) { if ((sidecarData as SideCar).xmp.Rating !== undefined) { metadata.rating = (sidecarData as SideCar).xmp.Rating; @@ -642,6 +646,10 @@ export class MetadataLoader { } } } + if (Object.hasOwn(sidecarData, 'xap')) { + (sidecarData as any)['xmp'] = (sidecarData as any)['xap']; + delete (sidecarData as any)['xap']; + } if ((sidecarData as SideCar).xmp !== undefined) { if ((sidecarData as SideCar).xmp.Rating !== undefined) { metadata.rating = (sidecarData as SideCar).xmp.Rating;