aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers
diff options
context:
space:
mode:
Diffstat (limited to 'server/initializers')
-rw-r--r--server/initializers/constants.ts7
-rw-r--r--server/initializers/installer.ts4
2 files changed, 9 insertions, 2 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index 154a9cffe..59c30fdee 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -11,6 +11,7 @@ import { invert } from 'lodash'
11import { CronRepeatOptions, EveryRepeatOptions } from 'bull' 11import { CronRepeatOptions, EveryRepeatOptions } from 'bull'
12import * as bytes from 'bytes' 12import * as bytes from 'bytes'
13import { VideoPlaylistPrivacy } from '../../shared/models/videos/playlist/video-playlist-privacy.model' 13import { VideoPlaylistPrivacy } from '../../shared/models/videos/playlist/video-playlist-privacy.model'
14import { VideoPlaylistType } from '../../shared/models/videos/playlist/video-playlist-type.model'
14 15
15// Use a variable to reload the configuration if we need 16// Use a variable to reload the configuration if we need
16let config: IConfig = require('config') 17let config: IConfig = require('config')
@@ -522,6 +523,11 @@ const VIDEO_PLAYLIST_PRIVACIES = {
522 [VideoPlaylistPrivacy.PRIVATE]: 'Private' 523 [VideoPlaylistPrivacy.PRIVATE]: 'Private'
523} 524}
524 525
526const VIDEO_PLAYLIST_TYPES = {
527 [VideoPlaylistType.REGULAR]: 'Regular',
528 [VideoPlaylistType.WATCH_LATER]: 'Watch later'
529}
530
525const MIMETYPES = { 531const MIMETYPES = {
526 VIDEO: { 532 VIDEO: {
527 MIMETYPE_EXT: buildVideoMimetypeExt(), 533 MIMETYPE_EXT: buildVideoMimetypeExt(),
@@ -778,6 +784,7 @@ export {
778 STATIC_MAX_AGE, 784 STATIC_MAX_AGE,
779 STATIC_PATHS, 785 STATIC_PATHS,
780 VIDEO_IMPORT_TIMEOUT, 786 VIDEO_IMPORT_TIMEOUT,
787 VIDEO_PLAYLIST_TYPES,
781 ACTIVITY_PUB, 788 ACTIVITY_PUB,
782 ACTIVITY_PUB_ACTOR_TYPES, 789 ACTIVITY_PUB_ACTOR_TYPES,
783 THUMBNAILS_SIZE, 790 THUMBNAILS_SIZE,
diff --git a/server/initializers/installer.ts b/server/initializers/installer.ts
index 2b22e16fe..c669606f8 100644
--- a/server/initializers/installer.ts
+++ b/server/initializers/installer.ts
@@ -1,7 +1,7 @@
1import * as passwordGenerator from 'password-generator' 1import * as passwordGenerator from 'password-generator'
2import { UserRole } from '../../shared' 2import { UserRole } from '../../shared'
3import { logger } from '../helpers/logger' 3import { logger } from '../helpers/logger'
4import { createApplicationActor, createUserAccountAndChannel } from '../lib/user' 4import { createApplicationActor, createUserAccountAndChannelAndPlaylist } from '../lib/user'
5import { UserModel } from '../models/account/user' 5import { UserModel } from '../models/account/user'
6import { ApplicationModel } from '../models/application/application' 6import { ApplicationModel } from '../models/application/application'
7import { OAuthClientModel } from '../models/oauth/oauth-client' 7import { OAuthClientModel } from '../models/oauth/oauth-client'
@@ -141,7 +141,7 @@ async function createOAuthAdminIfNotExist () {
141 } 141 }
142 const user = new UserModel(userData) 142 const user = new UserModel(userData)
143 143
144 await createUserAccountAndChannel(user, validatePassword) 144 await createUserAccountAndChannelAndPlaylist(user, validatePassword)
145 logger.info('Username: ' + username) 145 logger.info('Username: ' + username)
146 logger.info('User password: ' + password) 146 logger.info('User password: ' + password)
147} 147}