diff options
Diffstat (limited to 'server/initializers')
-rw-r--r-- | server/initializers/checker-before-init.ts | 1 | ||||
-rw-r--r-- | server/initializers/constants.ts | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/server/initializers/checker-before-init.ts b/server/initializers/checker-before-init.ts index 9dfb5d68c..b51c7cfba 100644 --- a/server/initializers/checker-before-init.ts +++ b/server/initializers/checker-before-init.ts | |||
@@ -12,6 +12,7 @@ function checkMissedConfig () { | |||
12 | 'database.hostname', 'database.port', 'database.suffix', 'database.username', 'database.password', 'database.pool.max', | 12 | 'database.hostname', 'database.port', 'database.suffix', 'database.username', 'database.password', 'database.pool.max', |
13 | 'smtp.hostname', 'smtp.port', 'smtp.username', 'smtp.password', 'smtp.tls', 'smtp.from_address', | 13 | 'smtp.hostname', 'smtp.port', 'smtp.username', 'smtp.password', 'smtp.tls', 'smtp.from_address', |
14 | 'storage.avatars', 'storage.videos', 'storage.logs', 'storage.previews', 'storage.thumbnails', 'storage.torrents', 'storage.cache', | 14 | 'storage.avatars', 'storage.videos', 'storage.logs', 'storage.previews', 'storage.thumbnails', 'storage.torrents', 'storage.cache', |
15 | 'storage.redundancy', 'storage.tmp', | ||
15 | 'log.level', | 16 | 'log.level', |
16 | 'user.video_quota', 'user.video_quota_daily', | 17 | 'user.video_quota', 'user.video_quota_daily', |
17 | 'cache.previews.size', 'admin.email', | 18 | 'cache.previews.size', 'admin.email', |
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index aa243859c..6b798875c 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts | |||
@@ -61,6 +61,7 @@ const OAUTH_LIFETIME = { | |||
61 | const ROUTE_CACHE_LIFETIME = { | 61 | const ROUTE_CACHE_LIFETIME = { |
62 | FEEDS: '15 minutes', | 62 | FEEDS: '15 minutes', |
63 | ROBOTS: '2 hours', | 63 | ROBOTS: '2 hours', |
64 | SITEMAP: '1 day', | ||
64 | SECURITYTXT: '2 hours', | 65 | SECURITYTXT: '2 hours', |
65 | NODEINFO: '10 minutes', | 66 | NODEINFO: '10 minutes', |
66 | DNT_POLICY: '1 week', | 67 | DNT_POLICY: '1 week', |
@@ -185,9 +186,11 @@ const CONFIG = { | |||
185 | FROM_ADDRESS: config.get<string>('smtp.from_address') | 186 | FROM_ADDRESS: config.get<string>('smtp.from_address') |
186 | }, | 187 | }, |
187 | STORAGE: { | 188 | STORAGE: { |
189 | TMP_DIR: buildPath(config.get<string>('storage.tmp')), | ||
188 | AVATARS_DIR: buildPath(config.get<string>('storage.avatars')), | 190 | AVATARS_DIR: buildPath(config.get<string>('storage.avatars')), |
189 | LOG_DIR: buildPath(config.get<string>('storage.logs')), | 191 | LOG_DIR: buildPath(config.get<string>('storage.logs')), |
190 | VIDEOS_DIR: buildPath(config.get<string>('storage.videos')), | 192 | VIDEOS_DIR: buildPath(config.get<string>('storage.videos')), |
193 | REDUNDANCY_DIR: buildPath(config.get<string>('storage.redundancy')), | ||
191 | THUMBNAILS_DIR: buildPath(config.get<string>('storage.thumbnails')), | 194 | THUMBNAILS_DIR: buildPath(config.get<string>('storage.thumbnails')), |
192 | PREVIEWS_DIR: buildPath(config.get<string>('storage.previews')), | 195 | PREVIEWS_DIR: buildPath(config.get<string>('storage.previews')), |
193 | CAPTIONS_DIR: buildPath(config.get<string>('storage.captions')), | 196 | CAPTIONS_DIR: buildPath(config.get<string>('storage.captions')), |
@@ -569,6 +572,7 @@ const STATIC_PATHS = { | |||
569 | THUMBNAILS: '/static/thumbnails/', | 572 | THUMBNAILS: '/static/thumbnails/', |
570 | TORRENTS: '/static/torrents/', | 573 | TORRENTS: '/static/torrents/', |
571 | WEBSEED: '/static/webseed/', | 574 | WEBSEED: '/static/webseed/', |
575 | REDUNDANCY: '/static/redundancy/', | ||
572 | AVATARS: '/static/avatars/', | 576 | AVATARS: '/static/avatars/', |
573 | VIDEO_CAPTIONS: '/static/video-captions/' | 577 | VIDEO_CAPTIONS: '/static/video-captions/' |
574 | } | 578 | } |
@@ -773,7 +777,7 @@ function buildVideosRedundancy (objs: any[]): VideosRedundancy[] { | |||
773 | if (!objs) return [] | 777 | if (!objs) return [] |
774 | 778 | ||
775 | return objs.map(obj => { | 779 | return objs.map(obj => { |
776 | return Object.assign(obj, { | 780 | return Object.assign({}, obj, { |
777 | minLifetime: parseDuration(obj.min_lifetime), | 781 | minLifetime: parseDuration(obj.min_lifetime), |
778 | size: bytes.parse(obj.size), | 782 | size: bytes.parse(obj.size), |
779 | minViews: obj.min_views | 783 | minViews: obj.min_views |