diff options
Diffstat (limited to 'server/initializers')
-rw-r--r-- | server/initializers/constants.ts | 7 | ||||
-rw-r--r-- | server/initializers/index.ts | 2 | ||||
-rw-r--r-- | server/initializers/migrations/0170-actor-follow-score.ts | 2 | ||||
-rw-r--r-- | server/initializers/migrations/0210-video-language.ts | 2 | ||||
-rw-r--r-- | server/initializers/migrations/0215-video-support-length.ts | 1 |
5 files changed, 8 insertions, 6 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 3922d8515..a0609d7cd 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts | |||
@@ -341,7 +341,7 @@ const VIDEO_LICENCES = { | |||
341 | 7: 'Public Domain Dedication' | 341 | 7: 'Public Domain Dedication' |
342 | } | 342 | } |
343 | 343 | ||
344 | const VIDEO_LANGUAGES = buildLanguages() | 344 | let VIDEO_LANGUAGES: { [id: string]: string } = {} |
345 | 345 | ||
346 | const VIDEO_PRIVACIES = { | 346 | const VIDEO_PRIVACIES = { |
347 | [ VideoPrivacy.PUBLIC ]: 'Public', | 347 | [ VideoPrivacy.PUBLIC ]: 'Public', |
@@ -684,6 +684,7 @@ export { | |||
684 | VIDEO_VIEW_LIFETIME, | 684 | VIDEO_VIEW_LIFETIME, |
685 | CONTACT_FORM_LIFETIME, | 685 | CONTACT_FORM_LIFETIME, |
686 | VIDEO_PLAYLIST_PRIVACIES, | 686 | VIDEO_PLAYLIST_PRIVACIES, |
687 | loadLanguages, | ||
687 | buildLanguages | 688 | buildLanguages |
688 | } | 689 | } |
689 | 690 | ||
@@ -732,6 +733,10 @@ function buildVideosExtname () { | |||
732 | : [ '.mp4', '.ogv', '.webm' ] | 733 | : [ '.mp4', '.ogv', '.webm' ] |
733 | } | 734 | } |
734 | 735 | ||
736 | function loadLanguages () { | ||
737 | VIDEO_LANGUAGES = buildLanguages() | ||
738 | } | ||
739 | |||
735 | function buildLanguages () { | 740 | function buildLanguages () { |
736 | const iso639 = require('iso-639-3') | 741 | const iso639 = require('iso-639-3') |
737 | 742 | ||
diff --git a/server/initializers/index.ts b/server/initializers/index.ts index fe9190a9c..0fc1a7363 100644 --- a/server/initializers/index.ts +++ b/server/initializers/index.ts | |||
@@ -1,5 +1,3 @@ | |||
1 | // Constants first, database in second! | ||
2 | export * from './constants' | ||
3 | export * from './database' | 1 | export * from './database' |
4 | export * from './installer' | 2 | export * from './installer' |
5 | export * from './migrator' | 3 | export * from './migrator' |
diff --git a/server/initializers/migrations/0170-actor-follow-score.ts b/server/initializers/migrations/0170-actor-follow-score.ts index 2deabaf98..a12b35da9 100644 --- a/server/initializers/migrations/0170-actor-follow-score.ts +++ b/server/initializers/migrations/0170-actor-follow-score.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | import { ACTOR_FOLLOW_SCORE } from '../index' | 2 | import { ACTOR_FOLLOW_SCORE } from '../constants' |
3 | 3 | ||
4 | async function up (utils: { | 4 | async function up (utils: { |
5 | transaction: Sequelize.Transaction, | 5 | transaction: Sequelize.Transaction, |
diff --git a/server/initializers/migrations/0210-video-language.ts b/server/initializers/migrations/0210-video-language.ts index b7ec90905..ca95c7527 100644 --- a/server/initializers/migrations/0210-video-language.ts +++ b/server/initializers/migrations/0210-video-language.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | import { CONSTRAINTS_FIELDS } from '../index' | 2 | import { CONSTRAINTS_FIELDS } from '../constants' |
3 | 3 | ||
4 | async function up (utils: { | 4 | async function up (utils: { |
5 | transaction: Sequelize.Transaction, | 5 | transaction: Sequelize.Transaction, |
diff --git a/server/initializers/migrations/0215-video-support-length.ts b/server/initializers/migrations/0215-video-support-length.ts index 994eda60d..ba395050f 100644 --- a/server/initializers/migrations/0215-video-support-length.ts +++ b/server/initializers/migrations/0215-video-support-length.ts | |||
@@ -1,5 +1,4 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | import { CONSTRAINTS_FIELDS } from '../index' | ||
3 | 2 | ||
4 | async function up (utils: { | 3 | async function up (utils: { |
5 | transaction: Sequelize.Transaction, | 4 | transaction: Sequelize.Transaction, |