diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-11-11 11:52:24 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-11-16 20:29:26 +0100 |
commit | 6a94a109b4b89a97fe7bfeded3125fb7aad2ac3b (patch) | |
tree | 22397531c03da92be50e28703764405002acb926 /server/initializers | |
parent | 830bcd0f82c16b8b5f1259150a6d541a210693eb (diff) | |
download | PeerTube-6a94a109b4b89a97fe7bfeded3125fb7aad2ac3b.tar.gz PeerTube-6a94a109b4b89a97fe7bfeded3125fb7aad2ac3b.tar.zst PeerTube-6a94a109b4b89a97fe7bfeded3125fb7aad2ac3b.zip |
Server: add video preview
Diffstat (limited to 'server/initializers')
-rw-r--r-- | server/initializers/checker.js | 2 | ||||
-rw-r--r-- | server/initializers/constants.js | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/server/initializers/checker.js b/server/initializers/checker.js index dad8525fa..aea013fa9 100644 --- a/server/initializers/checker.js +++ b/server/initializers/checker.js | |||
@@ -30,7 +30,7 @@ function checkMissedConfig () { | |||
30 | const required = [ 'listen.port', | 30 | const required = [ 'listen.port', |
31 | 'webserver.https', 'webserver.hostname', 'webserver.port', | 31 | 'webserver.https', 'webserver.hostname', 'webserver.port', |
32 | 'database.hostname', 'database.port', 'database.suffix', | 32 | 'database.hostname', 'database.port', 'database.suffix', |
33 | 'storage.certs', 'storage.videos', 'storage.logs', 'storage.thumbnails' | 33 | 'storage.certs', 'storage.videos', 'storage.logs', 'storage.thumbnails', 'storage.previews' |
34 | ] | 34 | ] |
35 | const miss = [] | 35 | const miss = [] |
36 | 36 | ||
diff --git a/server/initializers/constants.js b/server/initializers/constants.js index d345776ff..a50eb2f66 100644 --- a/server/initializers/constants.js +++ b/server/initializers/constants.js | |||
@@ -44,6 +44,7 @@ const CONFIG = { | |||
44 | LOG_DIR: path.join(__dirname, '..', '..', config.get('storage.logs')), | 44 | LOG_DIR: path.join(__dirname, '..', '..', config.get('storage.logs')), |
45 | VIDEOS_DIR: path.join(__dirname, '..', '..', config.get('storage.videos')), | 45 | VIDEOS_DIR: path.join(__dirname, '..', '..', config.get('storage.videos')), |
46 | THUMBNAILS_DIR: path.join(__dirname, '..', '..', config.get('storage.thumbnails')), | 46 | THUMBNAILS_DIR: path.join(__dirname, '..', '..', config.get('storage.thumbnails')), |
47 | PREVIEWS_DIR: path.join(__dirname, '..', '..', config.get('storage.previews')), | ||
47 | TORRENTS_DIR: path.join(__dirname, '..', '..', config.get('storage.torrents')) | 48 | TORRENTS_DIR: path.join(__dirname, '..', '..', config.get('storage.torrents')) |
48 | }, | 49 | }, |
49 | WEBSERVER: { | 50 | WEBSERVER: { |
@@ -135,6 +136,7 @@ const BCRYPT_SALT_SIZE = 10 | |||
135 | 136 | ||
136 | // Express static paths (router) | 137 | // Express static paths (router) |
137 | const STATIC_PATHS = { | 138 | const STATIC_PATHS = { |
139 | PREVIEWS: '/static/previews', | ||
138 | THUMBNAILS: '/static/thumbnails', | 140 | THUMBNAILS: '/static/thumbnails', |
139 | TORRENTS: '/static/torrents/', | 141 | TORRENTS: '/static/torrents/', |
140 | WEBSEED: '/static/webseed/' | 142 | WEBSEED: '/static/webseed/' |
@@ -145,6 +147,7 @@ let STATIC_MAX_AGE = '30d' | |||
145 | 147 | ||
146 | // Videos thumbnail size | 148 | // Videos thumbnail size |
147 | const THUMBNAILS_SIZE = '200x110' | 149 | const THUMBNAILS_SIZE = '200x110' |
150 | const PREVIEWS_SIZE = '640x480' | ||
148 | 151 | ||
149 | const USER_ROLES = { | 152 | const USER_ROLES = { |
150 | ADMIN: 'admin', | 153 | ADMIN: 'admin', |
@@ -179,6 +182,7 @@ module.exports = { | |||
179 | REQUESTS_INTERVAL, | 182 | REQUESTS_INTERVAL, |
180 | REQUESTS_LIMIT, | 183 | REQUESTS_LIMIT, |
181 | RETRY_REQUESTS, | 184 | RETRY_REQUESTS, |
185 | PREVIEWS_SIZE, | ||
182 | SEARCHABLE_COLUMNS, | 186 | SEARCHABLE_COLUMNS, |
183 | SORTABLE_COLUMNS, | 187 | SORTABLE_COLUMNS, |
184 | STATIC_MAX_AGE, | 188 | STATIC_MAX_AGE, |