From 4bb1f94f35fc4915fda71bcc5766ff6b289facb0 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Fri, 19 Jan 2024 09:33:22 -0800 Subject: [PATCH] timeline: handle stacking Pixel 8 Pro RAW stack (fix #1006) Signed-off-by: Varun Patil --- src/components/Timeline.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/Timeline.vue b/src/components/Timeline.vue index ac12bd7b..c794992b 100644 --- a/src/components/Timeline.vue +++ b/src/components/Timeline.vue @@ -1065,11 +1065,20 @@ export default defineComponent({ res1.push(photo); // Remove extension - const basename = utils.removeExtension(photo.basename ?? String()); + let basename = utils.removeExtension(photo.basename ?? String()); if (!basename) continue; // huh? // Store RAW files for stacking if (this.config.stack_raw_files && photo.mimetype === this.c.MIME_RAW) { + // Google's RAW naming is inconsistent and retarded. + // We will handle this on a case-to-case basis. + // https://github.com/pulsejet/memories/issues/1006 + // https://github.com/pulsejet/memories/issues/927 (handled in the 2nd pass) + if (basename.endsWith('.ORIGINAL')) { + basename = utils.removeExtension(basename); + } + + // Store the RAW file for stacking with the usable basename const files = toStack.get(basename); if (!files) { toStack.set(basename, [photo]);