aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-06-07 09:43:18 +0200
committerChocobozzz <me@florianbigard.com>2018-06-07 09:43:18 +0200
commit28be89161aab245526d64f6fb7dd29391a97fe0a (patch)
tree1ee8bece60eea295f218cb5936141848f3a470fc /server/initializers
parent0138af9237b77dd7d3a49260d164193b4048de84 (diff)
downloadPeerTube-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')
-rw-r--r--server/initializers/constants.ts3
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
8import { buildPath, isTestInstance, root, sanitizeHost, sanitizeUrl } from '../helpers/core-utils' 8import { buildPath, isTestInstance, root, sanitizeHost, sanitizeUrl } from '../helpers/core-utils'
9import { NSFWPolicyType } from '../../shared/models/videos/nsfw-policy.type' 9import { NSFWPolicyType } from '../../shared/models/videos/nsfw-policy.type'
10import { 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
12let config: IConfig = require('config') 13let 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}
334const VIDEO_EXT_MIMETYPE = invert(VIDEO_MIMETYPE_EXT)
333 335
334const IMAGE_MIMETYPE_EXT = { 336const 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