diff --git a/lib/Controller/OtherController.php b/lib/Controller/OtherController.php index 673779f6..3f5328f5 100644 --- a/lib/Controller/OtherController.php +++ b/lib/Controller/OtherController.php @@ -81,8 +81,6 @@ class OtherController extends GenericApiController return $this->config->getUserValue($uid, Application::APPNAME, $key, $default); }; - $defaultTimelinePath = $this->config->getSystemValue('memories.default_timeline_path', 'EMPTY'); - return new JSONResponse([ // general stuff 'version' => $version, @@ -100,7 +98,7 @@ class OtherController extends GenericApiController 'preview_generator_enabled' => Util::previewGeneratorIsEnabled(), // general settings - 'timeline_path' => $getAppConfig('timelinePath', $defaultTimelinePath), + 'timeline_path' => $getAppConfig('timelinePath', Util::getSystemConfig('memories.timeline.default_path')), 'enable_top_memories' => 'true' === $getAppConfig('enableTopMemories', 'true'), // viewer settings diff --git a/lib/SystemConfigDefault.php b/lib/SystemConfigDefault.php index d5f3cbe6..c3285ca5 100644 --- a/lib/SystemConfigDefault.php +++ b/lib/SystemConfigDefault.php @@ -21,6 +21,10 @@ return [ // Places database type identifier 'memories.gis_type' => -1, + // Default timeline path for all users + // If set to '_empty_', the user is prompted to select a path on first open (default) + 'memories.timeline.default_path' => '_empty_', + // Default viewer high resolution image loading condition // Valid values: 'always' | 'zoom' | 'never' 'memories.viewer.high_res_cond_default' => 'zoom', @@ -70,9 +74,6 @@ return [ // 1080 => 1080p (and so on) 'memories.video_default_quality' => '0', - // Default timeline path for all users; if not set, default is '/Photos' - 'memories.default_timeline_path' => 'Photos/', - // Memories only provides an admin interface for these // https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html#previews 'enabledPreviewProviders' => [], diff --git a/lib/Util.php b/lib/Util.php index 6cfc05a4..28f59317 100644 --- a/lib/Util.php +++ b/lib/Util.php @@ -316,8 +316,8 @@ class Util public static function getTimelinePaths(string $uid): array { $config = \OC::$server->get(IConfig::class); - $defaultTimelinePath = self::getSystemConfig('memories.default_timeline_path'); - $paths = $config->getUserValue($uid, Application::APPNAME, 'timelinePath', null) ?? $defaultTimelinePath; + $paths = $config->getUserValue($uid, Application::APPNAME, 'timelinePath', null) + ?? self::getSystemConfig('memories.timeline.default_path'); return array_map(static fn ($p) => self::sanitizePath(trim($p)), explode(';', $paths)); } diff --git a/src/App.vue b/src/App.vue index 73206247..fba4d74a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -3,7 +3,7 @@