aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/checker-after-init.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-05-28 11:15:38 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-05-29 09:32:12 +0200
commit72c33e716fecd1826dcf645957f8669821f91ff3 (patch)
tree31d270c2afc2f07303fa491189d6b6b1c0ea8bb1 /server/initializers/checker-after-init.ts
parent8adf0a767f0816465ac3a8f4a6c63f53dd05fe3d (diff)
downloadPeerTube-72c33e716fecd1826dcf645957f8669821f91ff3.tar.gz
PeerTube-72c33e716fecd1826dcf645957f8669821f91ff3.tar.zst
PeerTube-72c33e716fecd1826dcf645957f8669821f91ff3.zip
Support broadcast messages
Diffstat (limited to 'server/initializers/checker-after-init.ts')
-rw-r--r--server/initializers/checker-after-init.ts14
1 files changed, 12 insertions, 2 deletions
diff --git a/server/initializers/checker-after-init.ts b/server/initializers/checker-after-init.ts
index f111be2ae..b5b854137 100644
--- a/server/initializers/checker-after-init.ts
+++ b/server/initializers/checker-after-init.ts
@@ -107,6 +107,10 @@ function checkConfig () {
107 } 107 }
108 } 108 }
109 109
110 if (CONFIG.STORAGE.VIDEOS_DIR === CONFIG.STORAGE.REDUNDANCY_DIR) {
111 logger.warn('Redundancy directory should be different than the videos folder.')
112 }
113
110 // Transcoding 114 // Transcoding
111 if (CONFIG.TRANSCODING.ENABLED) { 115 if (CONFIG.TRANSCODING.ENABLED) {
112 if (CONFIG.TRANSCODING.WEBTORRENT.ENABLED === false && CONFIG.TRANSCODING.HLS.ENABLED === false) { 116 if (CONFIG.TRANSCODING.WEBTORRENT.ENABLED === false && CONFIG.TRANSCODING.HLS.ENABLED === false) {
@@ -114,8 +118,14 @@ function checkConfig () {
114 } 118 }
115 } 119 }
116 120
117 if (CONFIG.STORAGE.VIDEOS_DIR === CONFIG.STORAGE.REDUNDANCY_DIR) { 121 // Broadcast message
118 logger.warn('Redundancy directory should be different than the videos folder.') 122 if (CONFIG.BROADCAST_MESSAGE.ENABLED) {
123 const currentLevel = CONFIG.BROADCAST_MESSAGE.LEVEL
124 const available = [ 'info', 'warning', 'error' ]
125
126 if (available.includes(currentLevel) === false) {
127 return 'Broadcast message level should be ' + available.join(' or ') + ' instead of ' + currentLevel
128 }
119 } 129 }
120 130
121 return null 131 return null