aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-09-19 16:12:07 +0200
committerChocobozzz <me@florianbigard.com>2018-09-19 16:12:07 +0200
commitd9bdd007d7a1368d2a13127ecb5c0a81a18a8c04 (patch)
tree67cb4d2774dd7127499b882a5aa5069ea6fa86b2 /server/initializers
parent12ba460e9ebf4951f9c1caee8822a8ca1523563f (diff)
downloadPeerTube-d9bdd007d7a1368d2a13127ecb5c0a81a18a8c04.tar.gz
PeerTube-d9bdd007d7a1368d2a13127ecb5c0a81a18a8c04.tar.zst
PeerTube-d9bdd007d7a1368d2a13127ecb5c0a81a18a8c04.zip
Put config redundancy strategies in "strategies" subkey
Diffstat (limited to 'server/initializers')
-rw-r--r--server/initializers/checker.ts3
-rw-r--r--server/initializers/constants.ts4
2 files changed, 5 insertions, 2 deletions
diff --git a/server/initializers/checker.ts b/server/initializers/checker.ts
index b9dc1e725..8b5280848 100644
--- a/server/initializers/checker.ts
+++ b/server/initializers/checker.ts
@@ -40,7 +40,7 @@ function checkConfig () {
40 } 40 }
41 41
42 // Redundancies 42 // Redundancies
43 const redundancyVideos = config.get<VideosRedundancy[]>('redundancy.videos') 43 const redundancyVideos = config.get<VideosRedundancy[]>('redundancy.videos.strategies')
44 if (isArray(redundancyVideos)) { 44 if (isArray(redundancyVideos)) {
45 for (const r of redundancyVideos) { 45 for (const r of redundancyVideos) {
46 if ([ 'most-views', 'trending', 'recently-added' ].indexOf(r.strategy) === -1) { 46 if ([ 'most-views', 'trending', 'recently-added' ].indexOf(r.strategy) === -1) {
@@ -75,6 +75,7 @@ function checkMissedConfig () {
75 'cache.previews.size', 'admin.email', 75 'cache.previews.size', 'admin.email',
76 'signup.enabled', 'signup.limit', 'signup.requires_email_verification', 76 'signup.enabled', 'signup.limit', 'signup.requires_email_verification',
77 'signup.filters.cidr.whitelist', 'signup.filters.cidr.blacklist', 77 'signup.filters.cidr.whitelist', 'signup.filters.cidr.blacklist',
78 'redundancy.videos.strategies',
78 'transcoding.enabled', 'transcoding.threads', 79 'transcoding.enabled', 'transcoding.threads',
79 'import.videos.http.enabled', 'import.videos.torrent.enabled', 80 'import.videos.http.enabled', 'import.videos.torrent.enabled',
80 'trending.videos.interval_days', 81 'trending.videos.interval_days',
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index fa9093918..881978753 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -212,7 +212,9 @@ const CONFIG = {
212 } 212 }
213 }, 213 },
214 REDUNDANCY: { 214 REDUNDANCY: {
215 VIDEOS: buildVideosRedundancy(config.get<any[]>('redundancy.videos')) 215 VIDEOS: {
216 STRATEGIES: buildVideosRedundancy(config.get<any[]>('redundancy.videos.strategies'))
217 }
216 }, 218 },
217 ADMIN: { 219 ADMIN: {
218 get EMAIL () { return config.get<string>('admin.email') } 220 get EMAIL () { return config.get<string>('admin.email') }