timeline: handle stacking Pixel 8 Pro RAW stack (fix #1006)

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/1010/head
Varun Patil 2024-01-19 09:33:22 -08:00
parent 198eb620a0
commit 4bb1f94f35
1 changed files with 10 additions and 1 deletions

View File

@ -1065,11 +1065,20 @@ export default defineComponent({
res1.push(photo); res1.push(photo);
// Remove extension // Remove extension
const basename = utils.removeExtension(photo.basename ?? String()); let basename = utils.removeExtension(photo.basename ?? String());
if (!basename) continue; // huh? if (!basename) continue; // huh?
// Store RAW files for stacking // Store RAW files for stacking
if (this.config.stack_raw_files && photo.mimetype === this.c.MIME_RAW) { 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); const files = toStack.get(basename);
if (!files) { if (!files) {
toStack.set(basename, [photo]); toStack.set(basename, [photo]);