diff options
author | Chocobozzz <me@florianbigard.com> | 2018-06-07 09:43:18 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-07 09:43:18 +0200 |
commit | 28be89161aab245526d64f6fb7dd29391a97fe0a (patch) | |
tree | 1ee8bece60eea295f218cb5936141848f3a470fc /server/initializers/constants.ts | |
parent | 0138af9237b77dd7d3a49260d164193b4048de84 (diff) | |
download | PeerTube-28be89161aab245526d64f6fb7dd29391a97fe0a.tar.gz PeerTube-28be89161aab245526d64f6fb7dd29391a97fe0a.tar.zst PeerTube-28be89161aab245526d64f6fb7dd29391a97fe0a.zip |
Improve create import file job
Fix federation of .ogv videos
Diffstat (limited to 'server/initializers/constants.ts')
-rw-r--r-- | server/initializers/constants.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 482db2d5c..54f22c95a 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts | |||
@@ -7,6 +7,7 @@ import { VideoPrivacy } from '../../shared/models/videos' | |||
7 | // Do not use barrels, remain constants as independent as possible | 7 | // Do not use barrels, remain constants as independent as possible |
8 | import { buildPath, isTestInstance, root, sanitizeHost, sanitizeUrl } from '../helpers/core-utils' | 8 | import { buildPath, isTestInstance, root, sanitizeHost, sanitizeUrl } from '../helpers/core-utils' |
9 | import { NSFWPolicyType } from '../../shared/models/videos/nsfw-policy.type' | 9 | import { NSFWPolicyType } from '../../shared/models/videos/nsfw-policy.type' |
10 | import { invert } from 'lodash' | ||
10 | 11 | ||
11 | // Use a variable to reload the configuration if we need | 12 | // Use a variable to reload the configuration if we need |
12 | let config: IConfig = require('config') | 13 | let config: IConfig = require('config') |
@@ -330,6 +331,7 @@ const VIDEO_MIMETYPE_EXT = { | |||
330 | 'video/ogg': '.ogv', | 331 | 'video/ogg': '.ogv', |
331 | 'video/mp4': '.mp4' | 332 | 'video/mp4': '.mp4' |
332 | } | 333 | } |
334 | const VIDEO_EXT_MIMETYPE = invert(VIDEO_MIMETYPE_EXT) | ||
333 | 335 | ||
334 | const IMAGE_MIMETYPE_EXT = { | 336 | const IMAGE_MIMETYPE_EXT = { |
335 | 'image/png': '.png', | 337 | 'image/png': '.png', |
@@ -501,6 +503,7 @@ export { | |||
501 | SCHEDULER_INTERVAL, | 503 | SCHEDULER_INTERVAL, |
502 | STATIC_DOWNLOAD_PATHS, | 504 | STATIC_DOWNLOAD_PATHS, |
503 | RATES_LIMIT, | 505 | RATES_LIMIT, |
506 | VIDEO_EXT_MIMETYPE, | ||
504 | JOB_COMPLETED_LIFETIME, | 507 | JOB_COMPLETED_LIFETIME, |
505 | VIDEO_VIEW_LIFETIME, | 508 | VIDEO_VIEW_LIFETIME, |
506 | buildLanguages | 509 | buildLanguages |