diff --git a/lib/Controller/OtherController.php b/lib/Controller/OtherController.php
index 93522ab7..f8315781 100644
--- a/lib/Controller/OtherController.php
+++ b/lib/Controller/OtherController.php
@@ -102,6 +102,7 @@ class OtherController extends GenericApiController
// general settings
'timeline_path' => $getAppConfig('timelinePath', SystemConfig::get('memories.timeline.default_path')),
'enable_top_memories' => 'true' === $getAppConfig('enableTopMemories', 'true'),
+ 'stack_raw_files' => 'true' === $getAppConfig('stackRawFiles', 'true'),
// viewer settings
'high_res_cond_default' => SystemConfig::get('memories.viewer.high_res_cond_default'),
diff --git a/src/components/Settings.vue b/src/components/Settings.vue
index f9f68724..31b0c2ee 100644
--- a/src/components/Settings.vue
+++ b/src/components/Settings.vue
@@ -44,6 +44,14 @@
>
{{ t('memories', 'Show past photos on top of timeline') }}
+
+
+ {{ t('memories', 'Stack RAW files with same name') }}
+
@@ -286,6 +294,10 @@ export default defineComponent({
await this.updateSetting('enable_top_memories', 'enableTopMemories');
},
+ async updateStackRawFiles() {
+ await this.updateSetting('stack_raw_files', 'stackRawFiles');
+ },
+
// Viewer settings
async updateHighResCond(val: IConfig['high_res_cond']) {
this.config.high_res_cond = val;
diff --git a/src/components/Timeline.vue b/src/components/Timeline.vue
index 64d3d2e0..5623a6bb 100644
--- a/src/components/Timeline.vue
+++ b/src/components/Timeline.vue
@@ -1044,7 +1044,7 @@ export default defineComponent({
if (!basename) continue; // huh?
// Skip for raw files
- if (photo.mimetype === this.c.MIME_RAW) {
+ if (this.config.stack_raw_files && photo.mimetype === this.c.MIME_RAW) {
need2 = true;
continue;
}
@@ -1065,7 +1065,7 @@ export default defineComponent({
const res2: IPhoto[] = [];
for (const photo of res1) {
// Remove RAW files if they can be stacked
- if (photo.mimetype === this.c.MIME_RAW) {
+ if (this.config.stack_raw_files && photo.mimetype === this.c.MIME_RAW) {
// Get first matching non-raw file
const basename = utils.removeExtension(photo.basename ?? String());
diff --git a/src/services/static-config.ts b/src/services/static-config.ts
index 1c3029f1..bd2c1f2f 100644
--- a/src/services/static-config.ts
+++ b/src/services/static-config.ts
@@ -121,6 +121,7 @@ class StaticConfig {
// general settings
timeline_path: '_unknown_',
enable_top_memories: true,
+ stack_raw_files: true,
// viewer settings
high_res_cond_default: 'zoom',
diff --git a/src/typings/config.d.ts b/src/typings/config.d.ts
index f0e55f82..0aa8db12 100644
--- a/src/typings/config.d.ts
+++ b/src/typings/config.d.ts
@@ -18,6 +18,7 @@ declare module '@typings' {
// general settings
timeline_path: string;
enable_top_memories: boolean;
+ stack_raw_files: boolean;
// viewer settings
high_res_cond_default: 'always' | 'zoom' | 'never';