Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Rename "videos" config to "web-videos"

Chocobozzzd732ec7b46ca
diff --git a/.gitignore b/.gitignore
index c6029ad653..e0004004dd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,6 +23,7 @@ yarn-error.log
/ffmpeg-4/
/thumbnails/
/torrents/
+/web-videos/
/videos/
/previews/
/logs/
diff --git a/config/default.yaml b/config/default.yaml
index a9e74095e2..e590ab3005 100644
--- a/config/default.yaml
+++ b/config/default.yaml
@@ -130,7 +130,7 @@ storage:
tmp_persistent: 'storage/tmp-persistent/' # As tmp but the directory is not cleaned up between PeerTube restarts
bin: 'storage/bin/'
avatars: 'storage/avatars/'
- videos: 'storage/videos/'
+ web_videos: 'storage/web-videos/'
streaming_playlists: 'storage/streaming-playlists/'
redundancy: 'storage/redundancy/'
logs: 'storage/logs/'
@@ -202,8 +202,8 @@ object_storage:
base_url: '' # Example: 'https://mirror.example.com'
# Same settings but for web videos
- videos:
- bucket_name: 'videos'
+ web_videos:
+ bucket_name: 'web-videos'
prefix: ''
base_url: ''
diff --git a/config/production.yaml.example b/config/production.yaml.example
index 8fccaa5177..884300ddb8 100644
--- a/config/production.yaml.example
+++ b/config/production.yaml.example
@@ -128,7 +128,7 @@ storage:
tmp_persistent: '/var/www/peertube/storage/tmp-persistent/' # As tmp but the directory is not cleaned up between PeerTube restarts
bin: '/var/www/peertube/storage/bin/'
avatars: '/var/www/peertube/storage/avatars/'
- videos: '/var/www/peertube/storage/videos/'
+ web_videos: '/var/www/peertube/storage/web-videos/'
streaming_playlists: '/var/www/peertube/storage/streaming-playlists/'
redundancy: '/var/www/peertube/storage/redundancy/'
logs: '/var/www/peertube/storage/logs/'
@@ -200,8 +200,8 @@ object_storage:
base_url: '' # Example: 'https://mirror.example.com'
# Same settings but for web videos
- videos:
- bucket_name: 'videos'
+ web_videos:
+ bucket_name: 'web-videos'
prefix: ''
base_url: ''
diff --git a/config/test-1.yaml b/config/test-1.yaml
index 45ec27e638..b86b48438f 100644
--- a/config/test-1.yaml
+++ b/config/test-1.yaml
@@ -13,7 +13,7 @@ storage:
tmp_persistent: 'test1/tmp-persistent/'
bin: 'test1/bin/'
avatars: 'test1/avatars/'
- videos: 'test1/videos/'
+ web_videos: 'test1/web-videos/'
streaming_playlists: 'test1/streaming-playlists/'
redundancy: 'test1/redundancy/'
logs: 'test1/logs/'
diff --git a/config/test-2.yaml b/config/test-2.yaml
index 7a06e56500..266e44c175 100644
--- a/config/test-2.yaml
+++ b/config/test-2.yaml
@@ -13,7 +13,7 @@ storage:
tmp_persistent: 'test2/tmp-persistent/'
bin: 'test2/bin/'
avatars: 'test2/avatars/'
- videos: 'test2/videos/'
+ web_videos: 'test2/web-videos/'
streaming_playlists: 'test2/streaming-playlists/'
redundancy: 'test2/redundancy/'
logs: 'test2/logs/'
diff --git a/config/test-3.yaml b/config/test-3.yaml
index 4b1563369d..b31d377657 100644
--- a/config/test-3.yaml
+++ b/config/test-3.yaml
@@ -13,7 +13,7 @@ storage:
tmp_persistent: 'test3/tmp-persistent/'
bin: 'test3/bin/'
avatars: 'test3/avatars/'
- videos: 'test3/videos/'
+ web_videos: 'test3/web-videos/'
streaming_playlists: 'test3/streaming-playlists/'
redundancy: 'test3/redundancy/'
logs: 'test3/logs/'
diff --git a/config/test-4.yaml b/config/test-4.yaml
index 248db4db9a..d73b09b563 100644
--- a/config/test-4.yaml
+++ b/config/test-4.yaml
@@ -13,7 +13,7 @@ storage:
tmp_persistent: 'test4/tmp-persistent/'
bin: 'test4/bin/'
avatars: 'test4/avatars/'
- videos: 'test4/videos/'
+ web_videos: 'test4/web-videos/'
streaming_playlists: 'test4/streaming-playlists/'
redundancy: 'test4/redundancy/'
logs: 'test4/logs/'
diff --git a/config/test-5.yaml b/config/test-5.yaml
index 04e2cd78d4..56cdc52423 100644
--- a/config/test-5.yaml
+++ b/config/test-5.yaml
@@ -13,7 +13,7 @@ storage:
tmp_persistent: 'test5/tmp-persistent/'
bin: 'test5/bin/'
avatars: 'test5/avatars/'
- videos: 'test5/videos/'
+ web_videos: 'test5/web-videos/'
streaming_playlists: 'test5/streaming-playlists/'
redundancy: 'test5/redundancy/'
logs: 'test5/logs/'
diff --git a/config/test-6.yaml b/config/test-6.yaml
index 25efe00544..0e212c6995 100644
--- a/config/test-6.yaml
+++ b/config/test-6.yaml
@@ -13,7 +13,7 @@ storage:
tmp_persistent: 'test6/tmp-persistent/'
bin: 'test6/bin/'
avatars: 'test6/avatars/'
- videos: 'test6/videos/'
+ web_videos: 'test6/web-videos/'
streaming_playlists: 'test6/streaming-playlists/'
redundancy: 'test6/redundancy/'
logs: 'test6/logs/'
diff --git a/scripts/migrations/peertube-4.2.ts b/scripts/migrations/peertube-4.2.ts
index 513c629eff..d8929692b3 100644
--- a/scripts/migrations/peertube-4.2.ts
+++ b/scripts/migrations/peertube-4.2.ts
@@ -78,7 +78,7 @@ async function fillAvatarSizeIfNeeded (accountOrChannel: MAccountDefault | MChan
console.log('Filling size of avatars of %s.', accountOrChannel.name)
- const { width, height } = await getImageSize(join(CONFIG.STORAGE.ACTOR_IMAGES, avatar.filename))
+ const { width, height } = await getImageSize(join(CONFIG.STORAGE.ACTOR_IMAGES_DIR, avatar.filename))
avatar.width = width
avatar.height = height
@@ -107,8 +107,8 @@ async function generateSmallerAvatar (actor: MActorDefault) {
const sourceFilename = bigAvatar.filename
const newImageName = buildUUID() + getLowercaseExtension(sourceFilename)
- const source = join(CONFIG.STORAGE.ACTOR_IMAGES, sourceFilename)
- const destination = join(CONFIG.STORAGE.ACTOR_IMAGES, newImageName)
+ const source = join(CONFIG.STORAGE.ACTOR_IMAGES_DIR, sourceFilename)
+ const destination = join(CONFIG.STORAGE.ACTOR_IMAGES_DIR, newImageName)
await processImage({ path: source, destination, newSize: imageSize, keepOriginal: true })
diff --git a/scripts/prune-storage.ts b/scripts/prune-storage.ts
index 8d1ded59bb..9a73a8600c 100755
--- a/scripts/prune-storage.ts
+++ b/scripts/prune-storage.ts
@@ -50,7 +50,7 @@ async function run () {
await pruneDirectory(CONFIG.STORAGE.PREVIEWS_DIR, doesThumbnailExist(true, ThumbnailType.PREVIEW)),
await pruneDirectory(CONFIG.STORAGE.THUMBNAILS_DIR, doesThumbnailExist(false, ThumbnailType.MINIATURE)),
- await pruneDirectory(CONFIG.STORAGE.ACTOR_IMAGES, doesActorImageExist)
+ await pruneDirectory(CONFIG.STORAGE.ACTOR_IMAGES_DIR, doesActorImageExist)
)
const tmpFiles = await readdir(CONFIG.STORAGE.TMP_DIR)
diff --git a/server/initializers/checker-after-init.ts b/server/initializers/checker-after-init.ts
index 906a918e34..5ef72058b5 100644
--- a/server/initializers/checker-after-init.ts
+++ b/server/initializers/checker-after-init.ts
@@ -217,7 +217,7 @@ function checkStorageConfig () {
}
}
- if (CONFIG.STORAGE.VIDEOS_DIR === CONFIG.STORAGE.REDUNDANCY_DIR) {
+ if (CONFIG.STORAGE.WEB_VIDEOS_DIR === CONFIG.STORAGE.REDUNDANCY_DIR) {
logger.warn('Redundancy directory should be different than the videos folder.')
}
}
@@ -290,7 +290,7 @@ function checkLiveConfig () {
function checkObjectStorageConfig () {
if (CONFIG.OBJECT_STORAGE.ENABLED === true) {
- if (!CONFIG.OBJECT_STORAGE.VIDEOS.BUCKET_NAME) {
+ if (!CONFIG.OBJECT_STORAGE.WEB_VIDEOS.BUCKET_NAME) {
throw new Error('videos_bucket should be set when object storage support is enabled.')
}
@@ -299,10 +299,10 @@ function checkObjectStorageConfig () {
}
if (
- CONFIG.OBJECT_STORAGE.VIDEOS.BUCKET_NAME === CONFIG.OBJECT_STORAGE.STREAMING_PLAYLISTS.BUCKET_NAME &&
- CONFIG.OBJECT_STORAGE.VIDEOS.PREFIX === CONFIG.OBJECT_STORAGE.STREAMING_PLAYLISTS.PREFIX
+ CONFIG.OBJECT_STORAGE.WEB_VIDEOS.BUCKET_NAME === CONFIG.OBJECT_STORAGE.STREAMING_PLAYLISTS.BUCKET_NAME &&
+ CONFIG.OBJECT_STORAGE.WEB_VIDEOS.PREFIX === CONFIG.OBJECT_STORAGE.STREAMING_PLAYLISTS.PREFIX
) {
- if (CONFIG.OBJECT_STORAGE.VIDEOS.PREFIX === '') {
+ if (CONFIG.OBJECT_STORAGE.WEB_VIDEOS.PREFIX === '') {
throw new Error('Object storage bucket prefixes should be set when the same bucket is used for both types of video.')
}
diff --git a/server/initializers/checker-before-init.ts b/server/initializers/checker-before-init.ts
index 3d117d1b90..a872fcba3d 100644
--- a/server/initializers/checker-before-init.ts
+++ b/server/initializers/checker-before-init.ts
@@ -18,7 +18,7 @@ function checkMissedConfig () {
'database.hostname', 'database.port', 'database.username', 'database.password', 'database.pool.max',
'smtp.hostname', 'smtp.port', 'smtp.username', 'smtp.password', 'smtp.tls', 'smtp.from_address',
'email.body.signature', 'email.subject.prefix',
- 'storage.avatars', 'storage.videos', 'storage.logs', 'storage.previews', 'storage.thumbnails', 'storage.torrents', 'storage.cache',
+ 'storage.avatars', 'storage.web_videos', 'storage.logs', 'storage.previews', 'storage.thumbnails', 'storage.torrents', 'storage.cache',
'storage.redundancy', 'storage.tmp', 'storage.streaming_playlists', 'storage.plugins', 'storage.well_known',
'log.level', 'log.rotation.enabled', 'log.rotation.max_file_size', 'log.rotation.max_files', 'log.anonymize_ip',
'log.log_ping_requests', 'log.log_tracker_unknown_infohash', 'log.prettify_sql', 'log.accept_client_log',
@@ -60,8 +60,8 @@ function checkMissedConfig () {
'object_storage.enabled', 'object_storage.endpoint', 'object_storage.region', 'object_storage.upload_acl.public',
'object_storage.upload_acl.private', 'object_storage.proxy.proxify_private_files', 'object_storage.credentials.access_key_id',
'object_storage.credentials.secret_access_key', 'object_storage.max_upload_part', 'object_storage.streaming_playlists.bucket_name',
- 'object_storage.streaming_playlists.prefix', 'object_storage.streaming_playlists.base_url', 'object_storage.videos.bucket_name',
- 'object_storage.videos.prefix', 'object_storage.videos.base_url',
+ 'object_storage.streaming_playlists.prefix', 'object_storage.streaming_playlists.base_url', 'object_storage.web_videos.bucket_name',
+ 'object_storage.web_videos.prefix', 'object_storage.web_videos.base_url',
'theme.default',
'feeds.videos.count', 'feeds.comments.count',
'geo_ip.enabled', 'geo_ip.country.database_url',
diff --git a/server/initializers/config.ts b/server/initializers/config.ts
index 5301a17086..37cd852f13 100644
--- a/server/initializers/config.ts
+++ b/server/initializers/config.ts
@@ -106,9 +106,9 @@ const CONFIG = {
TMP_DIR: buildPath(config.get<string>('storage.tmp')),
TMP_PERSISTENT_DIR: buildPath(config.get<string>('storage.tmp_persistent')),
BIN_DIR: buildPath(config.get<string>('storage.bin')),
- ACTOR_IMAGES: buildPath(config.get<string>('storage.avatars')),
+ ACTOR_IMAGES_DIR: buildPath(config.get<string>('storage.avatars')),
LOG_DIR: buildPath(config.get<string>('storage.logs')),
- VIDEOS_DIR: buildPath(config.get<string>('storage.videos')),
+ WEB_VIDEOS_DIR: buildPath(config.get<string>('storage.web_videos')),
STREAMING_PLAYLISTS_DIR: buildPath(config.get<string>('storage.streaming_playlists')),
REDUNDANCY_DIR: buildPath(config.get<string>('storage.redundancy')),
THUMBNAILS_DIR: buildPath(config.get<string>('storage.thumbnails')),
@@ -140,10 +140,10 @@ const CONFIG = {
PROXY: {
PROXIFY_PRIVATE_FILES: config.get<boolean>('object_storage.proxy.proxify_private_files')
},
- VIDEOS: {
- BUCKET_NAME: config.get<string>('object_storage.videos.bucket_name'),
- PREFIX: config.get<string>('object_storage.videos.prefix'),
- BASE_URL: config.get<string>('object_storage.videos.base_url')
+ WEB_VIDEOS: {
+ BUCKET_NAME: config.get<string>('object_storage.web_videos.bucket_name'),
+ PREFIX: config.get<string>('object_storage.web_videos.prefix'),
+ BASE_URL: config.get<string>('object_storage.web_videos.base_url')
},
STREAMING_PLAYLISTS: {
BUCKET_NAME: config.get<string>('object_storage.streaming_playlists.bucket_name'),
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index d87aa6f54f..5116c63969 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -881,8 +881,8 @@ const DIRECTORIES = {
},
VIDEOS: {
- PUBLIC: CONFIG.STORAGE.VIDEOS_DIR,
- PRIVATE: join(CONFIG.STORAGE.VIDEOS_DIR, 'private')
+ PUBLIC: CONFIG.STORAGE.WEB_VIDEOS_DIR,
+ PRIVATE: join(CONFIG.STORAGE.WEB_VIDEOS_DIR, 'private')
},
HLS_REDUNDANCY: join(CONFIG.STORAGE.REDUNDANCY_DIR, 'hls')
diff --git a/server/lib/files-cache/avatar-permanent-file-cache.ts b/server/lib/files-cache/avatar-permanent-file-cache.ts
index 1d77c5bc1d..0c508b0636 100644
--- a/server/lib/files-cache/avatar-permanent-file-cache.ts
+++ b/server/lib/files-cache/avatar-permanent-file-cache.ts
@@ -7,7 +7,7 @@ import { AbstractPermanentFileCache } from './shared'
export class AvatarPermanentFileCache extends AbstractPermanentFileCache<MActorImage> {
constructor () {
- super(CONFIG.STORAGE.ACTOR_IMAGES)
+ super(CONFIG.STORAGE.ACTOR_IMAGES_DIR)
}
protected loadModel (filename: string) {
diff --git a/server/lib/local-actor.ts b/server/lib/local-actor.ts
index 872addc587..611e6d0af1 100644
--- a/server/lib/local-actor.ts
+++ b/server/lib/local-actor.ts
@@ -40,7 +40,7 @@ export async function updateLocalActorImageFiles (
const extension = getLowercaseExtension(imagePhysicalFile.filename)
const imageName = buildUUID() + extension
- const destination = join(CONFIG.STORAGE.ACTOR_IMAGES, imageName)
+ const destination = join(CONFIG.STORAGE.ACTOR_IMAGES_DIR, imageName)
await processImageFromWorker({ path: imagePhysicalFile.path, destination, newSize: imageSize, keepOriginal: true })
return {
diff --git a/server/lib/object-storage/pre-signed-urls.ts b/server/lib/object-storage/pre-signed-urls.ts
index 313654a574..caf149bb89 100644
--- a/server/lib/object-storage/pre-signed-urls.ts
+++ b/server/lib/object-storage/pre-signed-urls.ts
@@ -15,8 +15,8 @@ export async function generateWebVideoPresignedUrl (options: {
const key = generateWebVideoObjectStorageKey(file.filename)
const command = new GetObjectCommand({
- Bucket: CONFIG.OBJECT_STORAGE.VIDEOS.BUCKET_NAME,
- Key: buildKey(key, CONFIG.OBJECT_STORAGE.VIDEOS),
+ Bucket: CONFIG.OBJECT_STORAGE.WEB_VIDEOS.BUCKET_NAME,
+ Key: buildKey(key, CONFIG.OBJECT_STORAGE.WEB_VIDEOS),
ResponseContentDisposition: `attachment; filename=${downloadFilename}`
})
diff --git a/server/lib/object-storage/urls.ts b/server/lib/object-storage/urls.ts
index 84bc1f6c09..d25f840264 100644
--- a/server/lib/object-storage/urls.ts
+++ b/server/lib/object-storage/urls.ts
@@ -10,7 +10,7 @@ function getInternalUrl (config: BucketInfo, keyWithoutPrefix: string) {
// ---------------------------------------------------------------------------
function getWebVideoPublicFileUrl (fileUrl: string) {
- const baseUrl = CONFIG.OBJECT_STORAGE.VIDEOS.BASE_URL
+ const baseUrl = CONFIG.OBJECT_STORAGE.WEB_VIDEOS.BASE_URL
if (!baseUrl) return fileUrl
return replaceByBaseUrl(fileUrl, baseUrl)
diff --git a/server/lib/object-storage/videos.ts b/server/lib/object-storage/videos.ts
index 300c1f7e17..891e9ff763 100644
--- a/server/lib/object-storage/videos.ts
+++ b/server/lib/object-storage/videos.ts
@@ -59,7 +59,7 @@ function storeWebVideoFile (video: MVideo, file: MVideoFile) {
return storeObject({
inputPath: VideoPathManager.Instance.getFSVideoFileOutputPath(video, file),
objectStorageKey: generateWebVideoObjectStorageKey(file.filename),
- bucketInfo: CONFIG.OBJECT_STORAGE.VIDEOS,
+ bucketInfo: CONFIG.OBJECT_STORAGE.WEB_VIDEOS,
isPrivate: video.hasPrivateStaticPath()
})
}
@@ -69,7 +69,7 @@ function storeWebVideoFile (video: MVideo, file: MVideoFile) {
async function updateWebVideoFileACL (video: MVideo, file: MVideoFile) {
await updateObjectACL({
objectStorageKey: generateWebVideoObjectStorageKey(file.filename),
- bucketInfo: CONFIG.OBJECT_STORAGE.VIDEOS,
+ bucketInfo: CONFIG.OBJECT_STORAGE.WEB_VIDEOS,
isPrivate: video.hasPrivateStaticPath()
})
}
@@ -103,7 +103,7 @@ function removeHLSFileObjectStorageByFullKey (key: string) {
// ---------------------------------------------------------------------------
function removeWebVideoObjectStorage (videoFile: MVideoFile) {
- return removeObject(generateWebVideoObjectStorageKey(videoFile.filename), CONFIG.OBJECT_STORAGE.VIDEOS)
+ return removeObject(generateWebVideoObjectStorageKey(videoFile.filename), CONFIG.OBJECT_STORAGE.WEB_VIDEOS)
}
// ---------------------------------------------------------------------------
@@ -130,7 +130,7 @@ async function makeWebVideoFileAvailable (filename: string, destination: string)
await makeAvailable({
key,
destination,
- bucketInfo: CONFIG.OBJECT_STORAGE.VIDEOS
+ bucketInfo: CONFIG.OBJECT_STORAGE.WEB_VIDEOS
})
return destination
@@ -148,7 +148,7 @@ function getWebVideoFileReadStream (options: {
return createObjectReadStream({
key,
- bucketInfo: CONFIG.OBJECT_STORAGE.VIDEOS,
+ bucketInfo: CONFIG.OBJECT_STORAGE.WEB_VIDEOS,
rangeHeader
})
}
diff --git a/server/models/actor/actor-image.ts b/server/models/actor/actor-image.ts
index 9c34a0101a..51085a16dc 100644
--- a/server/models/actor/actor-image.ts
+++ b/server/models/actor/actor-image.ts
@@ -157,11 +157,11 @@ export class ActorImageModel extends Model<Partial<AttributesOnly<ActorImageMode
}
getPath () {
- return join(CONFIG.STORAGE.ACTOR_IMAGES, this.filename)
+ return join(CONFIG.STORAGE.ACTOR_IMAGES_DIR, this.filename)
}
removeImage () {
- const imagePath = join(CONFIG.STORAGE.ACTOR_IMAGES, this.filename)
+ const imagePath = join(CONFIG.STORAGE.ACTOR_IMAGES_DIR, this.filename)
return remove(imagePath)
}
diff --git a/server/tests/api/object-storage/videos.ts b/server/tests/api/object-storage/videos.ts
index c4f72bbe40..dcc52ef06b 100644
--- a/server/tests/api/object-storage/videos.ts
+++ b/server/tests/api/object-storage/videos.ts
@@ -181,7 +181,7 @@ function runTestSuite (options: {
: undefined
},
- videos: {
+ web_videos: {
bucket_name: options.webVideoBucket,
prefix: options.webVideoPrefix,
base_url: baseMockUrl
@@ -308,7 +308,7 @@ describe('Object storage for videos', function () {
bucket_name: 'aaa'
},
- videos: {
+ web_videos: {
bucket_name: 'aaa'
}
}
@@ -386,7 +386,7 @@ describe('Object storage for videos', function () {
describe('Test simple object storage', function () {
runTestSuite({
playlistBucket: objectStorage.getMockBucketName('streaming-playlists'),
- webVideoBucket: objectStorage.getMockBucketName('videos')
+ webVideoBucket: objectStorage.getMockBucketName('web-videos')
})
})
@@ -431,7 +431,7 @@ describe('Object storage for videos', function () {
runTestSuite({
maxUploadPart,
playlistBucket: objectStorage.getMockBucketName('streaming-playlists'),
- webVideoBucket: objectStorage.getMockBucketName('videos'),
+ webVideoBucket: objectStorage.getMockBucketName('web-videos'),
fixture
})
})
diff --git a/server/tests/api/redundancy/redundancy.ts b/server/tests/api/redundancy/redundancy.ts
index 9a8cb4f51e..85da6acf53 100644
--- a/server/tests/api/redundancy/redundancy.ts
+++ b/server/tests/api/redundancy/redundancy.ts
@@ -160,7 +160,7 @@ async function check2Webseeds (videoUUID?: string) {
const directories = [
servers[0].getDirectoryPath('redundancy'),
- servers[1].getDirectoryPath('videos')
+ servers[1].getDirectoryPath('web-videos')
]
for (const directory of directories) {
diff --git a/server/tests/api/transcoding/hls.ts b/server/tests/api/transcoding/hls.ts
index 0d2fc0fba1..d67043c2ae 100644
--- a/server/tests/api/transcoding/hls.ts
+++ b/server/tests/api/transcoding/hls.ts
@@ -75,8 +75,8 @@ describe('Test HLS videos', function () {
it('Should have the playlists/segment deleted from the disk', async function () {
for (const server of servers) {
- await checkDirectoryIsEmpty(server, 'videos', [ 'private' ])
- await checkDirectoryIsEmpty(server, join('videos', 'private'))
+ await checkDirectoryIsEmpty(server, 'web-videos', [ 'private' ])
+ await checkDirectoryIsEmpty(server, join('web-videos', 'private'))
await checkDirectoryIsEmpty(server, join('streaming-playlists', 'hls'), [ 'private' ])
await checkDirectoryIsEmpty(server, join('streaming-playlists', 'hls', 'private'))
diff --git a/server/tests/api/transcoding/transcoder.ts b/server/tests/api/transcoding/transcoder.ts
index b899b736d9..5386d236fe 100644
--- a/server/tests/api/transcoding/transcoder.ts
+++ b/server/tests/api/transcoding/transcoder.ts
@@ -586,7 +586,7 @@ describe('Test video transcoding', function () {
'1440p': true,
'2160p': true
},
- web_videos: { enabled: true },
+ webVideos: { enabled: true },
hls: { enabled: true }
}
}
diff --git a/server/tests/cli/create-move-video-storage-job.ts b/server/tests/cli/create-move-video-storage-job.ts
index 253fc983e5..fc6a8e6488 100644
--- a/server/tests/cli/create-move-video-storage-job.ts
+++ b/server/tests/cli/create-move-video-storage-job.ts
@@ -109,8 +109,8 @@ describe('Test create move video storage job', function () {
})
it('Should not have files on disk anymore', async function () {
- await checkDirectoryIsEmpty(servers[0], 'videos', [ 'private' ])
- await checkDirectoryIsEmpty(servers[0], join('videos', 'private'))
+ await checkDirectoryIsEmpty(servers[0], 'web-videos', [ 'private' ])
+ await checkDirectoryIsEmpty(servers[0], join('web-videos', 'private'))
await checkDirectoryIsEmpty(servers[0], join('streaming-playlists', 'hls'), [ 'private' ])
await checkDirectoryIsEmpty(servers[0], join('streaming-playlists', 'hls', 'private'))
diff --git a/server/tests/cli/prune-storage.ts b/server/tests/cli/prune-storage.ts
index b60e522a47..561ed6a688 100644
--- a/server/tests/cli/prune-storage.ts
+++ b/server/tests/cli/prune-storage.ts
@@ -35,10 +35,10 @@ async function assertNotExists (server: PeerTubeServer, directory: string, subst
async function assertCountAreOkay (servers: PeerTubeServer[]) {
for (const server of servers) {
- const videosCount = await countFiles(server, 'videos')
+ const videosCount = await countFiles(server, 'web-videos')
expect(videosCount).to.equal(9) // 2 videos with 4 resolutions + private directory
- const privateVideosCount = await countFiles(server, 'videos/private')
+ const privateVideosCount = await countFiles(server, 'web-videos/private')
expect(privateVideosCount).to.equal(4)
const torrentsCount = await countFiles(server, 'torrents')
@@ -131,8 +131,8 @@ describe('Test prune storage scripts', function () {
it('Should create some dirty files', async function () {
for (let i = 0; i < 2; i++) {
{
- const basePublic = servers[0].servers.buildDirectory('videos')
- const basePrivate = servers[0].servers.buildDirectory(join('videos', 'private'))
+ const basePublic = servers[0].servers.buildDirectory('web-videos')
+ const basePrivate = servers[0].servers.buildDirectory(join('web-videos', 'private'))
const n1 = buildUUID() + '.mp4'
const n2 = buildUUID() + '.webm'
diff --git a/shared/server-commands/server/object-storage-command.ts b/shared/server-commands/server/object-storage-command.ts
index 7d8ec93cd8..6bb232c36b 100644
--- a/shared/server-commands/server/object-storage-command.ts
+++ b/shared/server-commands/server/object-storage-command.ts
@@ -42,7 +42,7 @@ export class ObjectStorageCommand {
bucket_name: this.getMockStreamingPlaylistsBucketName()
},
- videos: {
+ web_videos: {
bucket_name: this.getMockWebVideosBucketName()
}
}
@@ -136,9 +136,9 @@ export class ObjectStorageCommand {
prefix: `test:server-${serverNumber}-streaming-playlists:`
},
- videos: {
+ web_videos: {
bucket_name: this.DEFAULT_SCALEWAY_BUCKET,
- prefix: `test:server-${serverNumber}-videos:`
+ prefix: `test:server-${serverNumber}-web-videos:`
}
}
}
diff --git a/shared/server-commands/server/server.ts b/shared/server-commands/server/server.ts
index 2629889eed..38568a8909 100644
--- a/shared/server-commands/server/server.ts
+++ b/shared/server-commands/server/server.ts
@@ -370,7 +370,7 @@ export class PeerTubeServer {
tmp_persistent: this.getDirectoryPath('tmp-persistent') + '/',
bin: this.getDirectoryPath('bin') + '/',
avatars: this.getDirectoryPath('avatars') + '/',
- videos: this.getDirectoryPath('videos') + '/',
+ web_videos: this.getDirectoryPath('web-videos') + '/',
streaming_playlists: this.getDirectoryPath('streaming-playlists') + '/',
redundancy: this.getDirectoryPath('redundancy') + '/',
logs: this.getDirectoryPath('logs') + '/',
diff --git a/shared/server-commands/server/servers-command.ts b/shared/server-commands/server/servers-command.ts
index 4e66a900c0..c91c2b008f 100644
--- a/shared/server-commands/server/servers-command.ts
+++ b/shared/server-commands/server/servers-command.ts
@@ -78,7 +78,7 @@ export class ServersCommand extends AbstractCommand {
}
buildWebVideoFilePath (fileUrl: string) {
- return this.buildDirectory(join('videos', basename(fileUrl)))
+ return this.buildDirectory(join('web-videos', basename(fileUrl)))
}
buildFragmentedFilePath (videoUUID: string, fileUrl: string) {
diff --git a/support/docker/production/config/custom-environment-variables.yaml b/support/docker/production/config/custom-environment-variables.yaml
index 8c1231bfc4..0058cbd643 100644
--- a/support/docker/production/config/custom-environment-variables.yaml
+++ b/support/docker/production/config/custom-environment-variables.yaml
@@ -86,10 +86,10 @@ object_storage:
base_url: "PEERTUBE_OBJECT_STORAGE_STREAMING_PLAYLISTS_BASE_URL"
upload_acl: "PEERTUBE_OBJECT_STORAGE_UPLOAD_ACL"
- videos:
- bucket_name: "PEERTUBE_OBJECT_STORAGE_VIDEOS_BUCKET_NAME"
- prefix: "PEERTUBE_OBJECT_STORAGE_VIDEOS_PREFIX"
- base_url: "PEERTUBE_OBJECT_STORAGE_VIDEOS_BASE_URL"
+ web_videos:
+ bucket_name: "PEERTUBE_OBJECT_STORAGE_WEB_VIDEOS_BUCKET_NAME"
+ prefix: "PEERTUBE_OBJECT_STORAGE_WEB_VIDEOS_PREFIX"
+ base_url: "PEERTUBE_OBJECT_STORAGE_WEB_VIDEOS_BASE_URL"
webadmin:
configuration:
diff --git a/support/docker/production/config/production.yaml b/support/docker/production/config/production.yaml
index e3f6247d84..9c9581e409 100644
--- a/support/docker/production/config/production.yaml
+++ b/support/docker/production/config/production.yaml
@@ -47,7 +47,7 @@ storage:
tmp_persistent: '../data/tmp-persistent/' # As tmp but the directory is not cleaned up between PeerTube restarts
bin: '../data/bin/'
avatars: '../data/avatars/'
- videos: '../data/videos/'
+ web_videos: '../data/web-videos/'
streaming_playlists: '../data/streaming-playlists'
redundancy: '../data/redundancy/'
logs: '../data/logs/'