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'
tasks.push(ensureDir(dir))
}
+ // Playlist directories
+ tasks.push(ensureDir(HLS_STREAMING_PLAYLIST_DIRECTORY))
+
return Promise.all(tasks)
}
}
const user = new UserModel(userData)
- await createUserAccountAndChannel(user, validatePassword)
+ await createUserAccountAndChannelAndPlaylist(user, validatePassword)
logger.info('Username: ' + username)
logger.info('User password: ' + password)
}