Set default timeline path option
parent
2d6c62065e
commit
83ed204d9c
|
@ -69,6 +69,9 @@ 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' => [],
|
||||
|
|
|
@ -316,7 +316,8 @@ class Util
|
|||
public static function getTimelinePaths(string $uid): array
|
||||
{
|
||||
$config = \OC::$server->get(IConfig::class);
|
||||
$paths = $config->getUserValue($uid, Application::APPNAME, 'timelinePath', null) ?? 'Photos/';
|
||||
$defaultTimelinePath = $config->getSystemValue('memories.default_timeline_path', 'Photos/');
|
||||
$paths = $config->getUserValue($uid, Application::APPNAME, 'timelinePath', null) ?? $defaultTimelinePath;
|
||||
|
||||
return array_map(static fn ($p) => self::sanitizePath(trim($p)), explode(';', $paths));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue