From 3ee030d8babfb4e0cd71c944f0dcde2283379ca7 Mon Sep 17 00:00:00 2001 From: kagahd Date: Mon, 26 Feb 2024 21:38:25 +0100 Subject: [PATCH] fix bug 2 of #838 : If the xmp file does not include the file extension of the tagged file, no keywords and ratings are shown in PiGallery's frontend. --- src/backend/model/fileaccess/MetadataLoader.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/model/fileaccess/MetadataLoader.ts b/src/backend/model/fileaccess/MetadataLoader.ts index 7a57508e..0f6af8fb 100644 --- a/src/backend/model/fileaccess/MetadataLoader.ts +++ b/src/backend/model/fileaccess/MetadataLoader.ts @@ -128,7 +128,7 @@ export class MetadataLoader { try { // search for sidecar and merge metadata - const fullPathWithoutExt = path.parse(fullPath).name; + const fullPathWithoutExt = path.join(path.parse(fullPath).dir, path.parse(fullPath).name); const sidecarPaths = [ fullPath + '.xmp', fullPath + '.XMP', @@ -524,7 +524,7 @@ export class MetadataLoader { try { // search for sidecar and merge metadata - const fullPathWithoutExt = path.parse(fullPath).name; + const fullPathWithoutExt = path.join(path.parse(fullPath).dir, path.parse(fullPath).name); const sidecarPaths = [ fullPath + '.xmp', fullPath + '.XMP',