diff options
author | Chocobozzz <me@florianbigard.com> | 2022-10-12 16:09:02 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2022-10-24 14:48:24 +0200 |
commit | 3545e72c686ff1725bbdfd8d16d693e2f4aa75a3 (patch) | |
tree | e7f1d12ef5dae1e1142c3a8d0b681c1dbbb0de10 /server/initializers/installer.ts | |
parent | 38a3ccc7f8ad0ea94362b58c732af7c387ab46be (diff) | |
download | PeerTube-3545e72c686ff1725bbdfd8d16d693e2f4aa75a3.tar.gz PeerTube-3545e72c686ff1725bbdfd8d16d693e2f4aa75a3.tar.zst PeerTube-3545e72c686ff1725bbdfd8d16d693e2f4aa75a3.zip |
Put private videos under a specific subdirectory
Diffstat (limited to 'server/initializers/installer.ts')
-rw-r--r-- | server/initializers/installer.ts | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/server/initializers/installer.ts b/server/initializers/installer.ts index b02be9567..f5d8eedf1 100644 --- a/server/initializers/installer.ts +++ b/server/initializers/installer.ts | |||
@@ -10,7 +10,7 @@ import { ApplicationModel } from '../models/application/application' | |||
10 | import { OAuthClientModel } from '../models/oauth/oauth-client' | 10 | import { OAuthClientModel } from '../models/oauth/oauth-client' |
11 | import { applicationExist, clientsExist, usersExist } from './checker-after-init' | 11 | import { applicationExist, clientsExist, usersExist } from './checker-after-init' |
12 | import { CONFIG } from './config' | 12 | import { CONFIG } from './config' |
13 | import { FILES_CACHE, HLS_STREAMING_PLAYLIST_DIRECTORY, LAST_MIGRATION_VERSION, RESUMABLE_UPLOAD_DIRECTORY } from './constants' | 13 | import { DIRECTORIES, FILES_CACHE, LAST_MIGRATION_VERSION } from './constants' |
14 | import { sequelizeTypescript } from './database' | 14 | import { sequelizeTypescript } from './database' |
15 | 15 | ||
16 | async function installApplication () { | 16 | async function installApplication () { |
@@ -92,11 +92,13 @@ function createDirectoriesIfNotExist () { | |||
92 | tasks.push(ensureDir(dir)) | 92 | tasks.push(ensureDir(dir)) |
93 | } | 93 | } |
94 | 94 | ||
95 | // Playlist directories | 95 | tasks.push(ensureDir(DIRECTORIES.HLS_STREAMING_PLAYLIST.PRIVATE)) |
96 | tasks.push(ensureDir(HLS_STREAMING_PLAYLIST_DIRECTORY)) | 96 | tasks.push(ensureDir(DIRECTORIES.HLS_STREAMING_PLAYLIST.PUBLIC)) |
97 | tasks.push(ensureDir(DIRECTORIES.VIDEOS.PUBLIC)) | ||
98 | tasks.push(ensureDir(DIRECTORIES.VIDEOS.PRIVATE)) | ||
97 | 99 | ||
98 | // Resumable upload directory | 100 | // Resumable upload directory |
99 | tasks.push(ensureDir(RESUMABLE_UPLOAD_DIRECTORY)) | 101 | tasks.push(ensureDir(DIRECTORIES.RESUMABLE_UPLOAD)) |
100 | 102 | ||
101 | return Promise.all(tasks) | 103 | return Promise.all(tasks) |
102 | } | 104 | } |