X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Finitializers%2Finstaller.ts;h=349d7afb7a7f967798b744034836d1425e082870;hb=d4c9f45b31eda0b7a391ddc83eb290ca5cba311f;hp=b9a9da18307e5301e3c66d552052ab4f965343fc;hpb=bc22d60899e14631cba0fb6450f4e85fc9528293;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/initializers/installer.ts b/server/initializers/installer.ts index b9a9da183..349d7afb7 100644 --- a/server/initializers/installer.ts +++ b/server/initializers/installer.ts @@ -1,12 +1,12 @@ import * as passwordGenerator from 'password-generator' import { UserRole } from '../../shared' import { logger } from '../helpers/logger' -import { createApplicationActor, createUserAccountAndChannel } from '../lib/user' +import { createApplicationActor, createUserAccountAndChannelAndPlaylist } from '../lib/user' import { UserModel } from '../models/account/user' import { ApplicationModel } from '../models/application/application' import { OAuthClientModel } from '../models/oauth/oauth-client' import { applicationExist, clientsExist, usersExist } from './checker-after-init' -import { CACHE, CONFIG, LAST_MIGRATION_VERSION } from './constants' +import { CACHE, CONFIG, HLS_STREAMING_PLAYLIST_DIRECTORY, LAST_MIGRATION_VERSION } from './constants' import { sequelizeTypescript } from './database' import { remove, ensureDir } from 'fs-extra' @@ -73,6 +73,9 @@ function createDirectoriesIfNotExist () { tasks.push(ensureDir(dir)) } + // Playlist directories + tasks.push(ensureDir(HLS_STREAMING_PLAYLIST_DIRECTORY)) + return Promise.all(tasks) } @@ -138,7 +141,7 @@ async function createOAuthAdminIfNotExist () { } const user = new UserModel(userData) - await createUserAccountAndChannel(user, validatePassword) + await createUserAccountAndChannelAndPlaylist(user, validatePassword) logger.info('Username: ' + username) logger.info('User password: ' + password) }