aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/controllers/api/config.ts4
-rw-r--r--server/controllers/api/users/my-notifications.ts2
-rw-r--r--server/controllers/api/videos/index.ts4
-rw-r--r--server/controllers/api/videos/studio.ts (renamed from server/controllers/api/videos/editor.ts)44
-rw-r--r--server/helpers/custom-validators/video-studio.ts (renamed from server/helpers/custom-validators/video-editor.ts)28
-rw-r--r--server/initializers/checker-after-init.ts8
-rw-r--r--server/initializers/checker-before-init.ts2
-rw-r--r--server/initializers/config.ts4
-rw-r--r--server/initializers/constants.ts8
-rw-r--r--server/initializers/migrations/0700-edition-finished-notification.ts6
-rw-r--r--server/lib/job-queue/handlers/video-studio-edition.ts (renamed from server/lib/job-queue/handlers/video-edition.ts)38
-rw-r--r--server/lib/job-queue/job-queue.ts10
-rw-r--r--server/lib/notifier/notifier.ts10
-rw-r--r--server/lib/notifier/shared/video-publication/index.ts2
-rw-r--r--server/lib/notifier/shared/video-publication/studio-edition-finished-for-owner.ts (renamed from server/lib/notifier/shared/video-publication/edition-finished-for-owner.ts)8
-rw-r--r--server/lib/server-config-manager.ts4
-rw-r--r--server/lib/user.ts2
-rw-r--r--server/lib/video-state.ts2
-rw-r--r--server/lib/video-studio.ts (renamed from server/lib/video-editor.ts)8
-rw-r--r--server/middlewares/validators/config.ts12
-rw-r--r--server/middlewares/validators/videos/index.ts2
-rw-r--r--server/middlewares/validators/videos/video-studio.ts (renamed from server/middlewares/validators/videos/video-editor.ts)40
-rw-r--r--server/models/user/user-notification-setting.ts8
-rw-r--r--server/tests/api/check-params/config.ts2
-rw-r--r--server/tests/api/check-params/index.ts2
-rw-r--r--server/tests/api/check-params/user-notifications.ts2
-rw-r--r--server/tests/api/check-params/video-studio.ts (renamed from server/tests/api/check-params/video-editor.ts)40
-rw-r--r--server/tests/api/notifications/user-notifications.ts14
-rw-r--r--server/tests/api/server/config.ts6
-rw-r--r--server/tests/api/transcoding/index.ts2
-rw-r--r--server/tests/api/transcoding/video-studio.ts (renamed from server/tests/api/transcoding/video-editor.ts)18
-rw-r--r--server/tests/shared/notifications.ts10
32 files changed, 176 insertions, 176 deletions
diff --git a/server/controllers/api/config.ts b/server/controllers/api/config.ts
index 376143cb8..cfb750bc9 100644
--- a/server/controllers/api/config.ts
+++ b/server/controllers/api/config.ts
@@ -259,8 +259,8 @@ function customConfig (): CustomConfig {
259 } 259 }
260 } 260 }
261 }, 261 },
262 videoEditor: { 262 videoStudio: {
263 enabled: CONFIG.VIDEO_EDITOR.ENABLED 263 enabled: CONFIG.VIDEO_STUDIO.ENABLED
264 }, 264 },
265 import: { 265 import: {
266 videos: { 266 videos: {
diff --git a/server/controllers/api/users/my-notifications.ts b/server/controllers/api/users/my-notifications.ts
index 55184dc0f..6014cdbbf 100644
--- a/server/controllers/api/users/my-notifications.ts
+++ b/server/controllers/api/users/my-notifications.ts
@@ -83,7 +83,7 @@ async function updateNotificationSettings (req: express.Request, res: express.Re
83 abuseStateChange: body.abuseStateChange, 83 abuseStateChange: body.abuseStateChange,
84 newPeerTubeVersion: body.newPeerTubeVersion, 84 newPeerTubeVersion: body.newPeerTubeVersion,
85 newPluginVersion: body.newPluginVersion, 85 newPluginVersion: body.newPluginVersion,
86 myVideoEditionFinished: body.myVideoEditionFinished 86 myVideoStudioEditionFinished: body.myVideoStudioEditionFinished
87 } 87 }
88 88
89 await UserNotificationSettingModel.update(values, query) 89 await UserNotificationSettingModel.update(values, query)
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts
index a5ae07d95..c7617093c 100644
--- a/server/controllers/api/videos/index.ts
+++ b/server/controllers/api/videos/index.ts
@@ -35,7 +35,7 @@ import { VideoModel } from '../../../models/video/video'
35import { blacklistRouter } from './blacklist' 35import { blacklistRouter } from './blacklist'
36import { videoCaptionsRouter } from './captions' 36import { videoCaptionsRouter } from './captions'
37import { videoCommentRouter } from './comment' 37import { videoCommentRouter } from './comment'
38import { editorRouter } from './editor' 38import { studioRouter } from './studio'
39import { filesRouter } from './files' 39import { filesRouter } from './files'
40import { videoImportsRouter } from './import' 40import { videoImportsRouter } from './import'
41import { liveRouter } from './live' 41import { liveRouter } from './live'
@@ -52,7 +52,7 @@ const videosRouter = express.Router()
52videosRouter.use('/', blacklistRouter) 52videosRouter.use('/', blacklistRouter)
53videosRouter.use('/', rateVideoRouter) 53videosRouter.use('/', rateVideoRouter)
54videosRouter.use('/', videoCommentRouter) 54videosRouter.use('/', videoCommentRouter)
55videosRouter.use('/', editorRouter) 55videosRouter.use('/', studioRouter)
56videosRouter.use('/', videoCaptionsRouter) 56videosRouter.use('/', videoCaptionsRouter)
57videosRouter.use('/', videoImportsRouter) 57videosRouter.use('/', videoImportsRouter)
58videosRouter.use('/', ownershipVideoRouter) 58videosRouter.use('/', ownershipVideoRouter)
diff --git a/server/controllers/api/videos/editor.ts b/server/controllers/api/videos/studio.ts
index 588cc1a8c..bff344f3f 100644
--- a/server/controllers/api/videos/editor.ts
+++ b/server/controllers/api/videos/studio.ts
@@ -2,26 +2,26 @@ import express from 'express'
2import { createAnyReqFiles } from '@server/helpers/express-utils' 2import { createAnyReqFiles } from '@server/helpers/express-utils'
3import { MIMETYPES } from '@server/initializers/constants' 3import { MIMETYPES } from '@server/initializers/constants'
4import { JobQueue } from '@server/lib/job-queue' 4import { JobQueue } from '@server/lib/job-queue'
5import { buildTaskFileFieldname, getTaskFile } from '@server/lib/video-editor' 5import { buildTaskFileFieldname, getTaskFile } from '@server/lib/video-studio'
6import { 6import {
7 HttpStatusCode, 7 HttpStatusCode,
8 VideoEditionTaskPayload, 8 VideoState,
9 VideoEditorCreateEdition, 9 VideoStudioCreateEdition,
10 VideoEditorTask, 10 VideoStudioTask,
11 VideoEditorTaskCut, 11 VideoStudioTaskCut,
12 VideoEditorTaskIntro, 12 VideoStudioTaskIntro,
13 VideoEditorTaskOutro, 13 VideoStudioTaskOutro,
14 VideoEditorTaskWatermark, 14 VideoStudioTaskPayload,
15 VideoState 15 VideoStudioTaskWatermark
16} from '@shared/models' 16} from '@shared/models'
17import { asyncMiddleware, authenticate, videosEditorAddEditionValidator } from '../../../middlewares' 17import { asyncMiddleware, authenticate, videoStudioAddEditionValidator } from '../../../middlewares'
18 18
19const editorRouter = express.Router() 19const studioRouter = express.Router()
20 20
21const tasksFiles = createAnyReqFiles( 21const tasksFiles = createAnyReqFiles(
22 MIMETYPES.VIDEO.MIMETYPE_EXT, 22 MIMETYPES.VIDEO.MIMETYPE_EXT,
23 (req: express.Request, file: Express.Multer.File, cb: (err: Error, result?: boolean) => void) => { 23 (req: express.Request, file: Express.Multer.File, cb: (err: Error, result?: boolean) => void) => {
24 const body = req.body as VideoEditorCreateEdition 24 const body = req.body as VideoStudioCreateEdition
25 25
26 // Fetch array element 26 // Fetch array element
27 const matches = file.fieldname.match(/tasks\[(\d+)\]/) 27 const matches = file.fieldname.match(/tasks\[(\d+)\]/)
@@ -43,24 +43,24 @@ const tasksFiles = createAnyReqFiles(
43 } 43 }
44) 44)
45 45
46editorRouter.post('/:videoId/editor/edit', 46studioRouter.post('/:videoId/studio/edit',
47 authenticate, 47 authenticate,
48 tasksFiles, 48 tasksFiles,
49 asyncMiddleware(videosEditorAddEditionValidator), 49 asyncMiddleware(videoStudioAddEditionValidator),
50 asyncMiddleware(createEditionTasks) 50 asyncMiddleware(createEditionTasks)
51) 51)
52 52
53// --------------------------------------------------------------------------- 53// ---------------------------------------------------------------------------
54 54
55export { 55export {
56 editorRouter 56 studioRouter
57} 57}
58 58
59// --------------------------------------------------------------------------- 59// ---------------------------------------------------------------------------
60 60
61async function createEditionTasks (req: express.Request, res: express.Response) { 61async function createEditionTasks (req: express.Request, res: express.Response) {
62 const files = req.files as Express.Multer.File[] 62 const files = req.files as Express.Multer.File[]
63 const body = req.body as VideoEditorCreateEdition 63 const body = req.body as VideoStudioCreateEdition
64 const video = res.locals.videoAll 64 const video = res.locals.videoAll
65 65
66 video.state = VideoState.TO_EDIT 66 video.state = VideoState.TO_EDIT
@@ -71,13 +71,13 @@ async function createEditionTasks (req: express.Request, res: express.Response)
71 tasks: body.tasks.map((t, i) => buildTaskPayload(t, i, files)) 71 tasks: body.tasks.map((t, i) => buildTaskPayload(t, i, files))
72 } 72 }
73 73
74 JobQueue.Instance.createJob({ type: 'video-edition', payload }) 74 JobQueue.Instance.createJob({ type: 'video-studio-edition', payload })
75 75
76 return res.sendStatus(HttpStatusCode.NO_CONTENT_204) 76 return res.sendStatus(HttpStatusCode.NO_CONTENT_204)
77} 77}
78 78
79const taskPayloadBuilders: { 79const taskPayloadBuilders: {
80 [id in VideoEditorTask['name']]: (task: VideoEditorTask, indice?: number, files?: Express.Multer.File[]) => VideoEditionTaskPayload 80 [id in VideoStudioTask['name']]: (task: VideoStudioTask, indice?: number, files?: Express.Multer.File[]) => VideoStudioTaskPayload
81} = { 81} = {
82 'add-intro': buildIntroOutroTask, 82 'add-intro': buildIntroOutroTask,
83 'add-outro': buildIntroOutroTask, 83 'add-outro': buildIntroOutroTask,
@@ -85,11 +85,11 @@ const taskPayloadBuilders: {
85 'add-watermark': buildWatermarkTask 85 'add-watermark': buildWatermarkTask
86} 86}
87 87
88function buildTaskPayload (task: VideoEditorTask, indice: number, files: Express.Multer.File[]): VideoEditionTaskPayload { 88function buildTaskPayload (task: VideoStudioTask, indice: number, files: Express.Multer.File[]): VideoStudioTaskPayload {
89 return taskPayloadBuilders[task.name](task, indice, files) 89 return taskPayloadBuilders[task.name](task, indice, files)
90} 90}
91 91
92function buildIntroOutroTask (task: VideoEditorTaskIntro | VideoEditorTaskOutro, indice: number, files: Express.Multer.File[]) { 92function buildIntroOutroTask (task: VideoStudioTaskIntro | VideoStudioTaskOutro, indice: number, files: Express.Multer.File[]) {
93 return { 93 return {
94 name: task.name, 94 name: task.name,
95 options: { 95 options: {
@@ -98,7 +98,7 @@ function buildIntroOutroTask (task: VideoEditorTaskIntro | VideoEditorTaskOutro,
98 } 98 }
99} 99}
100 100
101function buildCutTask (task: VideoEditorTaskCut) { 101function buildCutTask (task: VideoStudioTaskCut) {
102 return { 102 return {
103 name: task.name, 103 name: task.name,
104 options: { 104 options: {
@@ -108,7 +108,7 @@ function buildCutTask (task: VideoEditorTaskCut) {
108 } 108 }
109} 109}
110 110
111function buildWatermarkTask (task: VideoEditorTaskWatermark, indice: number, files: Express.Multer.File[]) { 111function buildWatermarkTask (task: VideoStudioTaskWatermark, indice: number, files: Express.Multer.File[]) {
112 return { 112 return {
113 name: task.name, 113 name: task.name,
114 options: { 114 options: {
diff --git a/server/helpers/custom-validators/video-editor.ts b/server/helpers/custom-validators/video-studio.ts
index 09238675e..19e7906d5 100644
--- a/server/helpers/custom-validators/video-editor.ts
+++ b/server/helpers/custom-validators/video-studio.ts
@@ -1,40 +1,40 @@
1import validator from 'validator' 1import validator from 'validator'
2import { CONSTRAINTS_FIELDS } from '@server/initializers/constants' 2import { CONSTRAINTS_FIELDS } from '@server/initializers/constants'
3import { buildTaskFileFieldname } from '@server/lib/video-editor' 3import { buildTaskFileFieldname } from '@server/lib/video-studio'
4import { VideoEditorTask } from '@shared/models' 4import { VideoStudioTask } from '@shared/models'
5import { isArray } from './misc' 5import { isArray } from './misc'
6import { isVideoFileMimeTypeValid, isVideoImageValid } from './videos' 6import { isVideoFileMimeTypeValid, isVideoImageValid } from './videos'
7 7
8function isValidEditorTasksArray (tasks: any) { 8function isValidStudioTasksArray (tasks: any) {
9 if (!isArray(tasks)) return false 9 if (!isArray(tasks)) return false
10 10
11 return tasks.length >= CONSTRAINTS_FIELDS.VIDEO_EDITOR.TASKS.min && 11 return tasks.length >= CONSTRAINTS_FIELDS.VIDEO_STUDIO.TASKS.min &&
12 tasks.length <= CONSTRAINTS_FIELDS.VIDEO_EDITOR.TASKS.max 12 tasks.length <= CONSTRAINTS_FIELDS.VIDEO_STUDIO.TASKS.max
13} 13}
14 14
15function isEditorCutTaskValid (task: VideoEditorTask) { 15function isStudioCutTaskValid (task: VideoStudioTask) {
16 if (task.name !== 'cut') return false 16 if (task.name !== 'cut') return false
17 if (!task.options) return false 17 if (!task.options) return false
18 18
19 const { start, end } = task.options 19 const { start, end } = task.options
20 if (!start && !end) return false 20 if (!start && !end) return false
21 21
22 if (start && !validator.isInt(start + '', CONSTRAINTS_FIELDS.VIDEO_EDITOR.CUT_TIME)) return false 22 if (start && !validator.isInt(start + '', CONSTRAINTS_FIELDS.VIDEO_STUDIO.CUT_TIME)) return false
23 if (end && !validator.isInt(end + '', CONSTRAINTS_FIELDS.VIDEO_EDITOR.CUT_TIME)) return false 23 if (end && !validator.isInt(end + '', CONSTRAINTS_FIELDS.VIDEO_STUDIO.CUT_TIME)) return false
24 24
25 if (!start || !end) return true 25 if (!start || !end) return true
26 26
27 return parseInt(start + '') < parseInt(end + '') 27 return parseInt(start + '') < parseInt(end + '')
28} 28}
29 29
30function isEditorTaskAddIntroOutroValid (task: VideoEditorTask, indice: number, files: Express.Multer.File[]) { 30function isStudioTaskAddIntroOutroValid (task: VideoStudioTask, indice: number, files: Express.Multer.File[]) {
31 const file = files.find(f => f.fieldname === buildTaskFileFieldname(indice, 'file')) 31 const file = files.find(f => f.fieldname === buildTaskFileFieldname(indice, 'file'))
32 32
33 return (task.name === 'add-intro' || task.name === 'add-outro') && 33 return (task.name === 'add-intro' || task.name === 'add-outro') &&
34 file && isVideoFileMimeTypeValid([ file ], null) 34 file && isVideoFileMimeTypeValid([ file ], null)
35} 35}
36 36
37function isEditorTaskAddWatermarkValid (task: VideoEditorTask, indice: number, files: Express.Multer.File[]) { 37function isStudioTaskAddWatermarkValid (task: VideoStudioTask, indice: number, files: Express.Multer.File[]) {
38 const file = files.find(f => f.fieldname === buildTaskFileFieldname(indice, 'file')) 38 const file = files.find(f => f.fieldname === buildTaskFileFieldname(indice, 'file'))
39 39
40 return task.name === 'add-watermark' && 40 return task.name === 'add-watermark' &&
@@ -44,9 +44,9 @@ function isEditorTaskAddWatermarkValid (task: VideoEditorTask, indice: number, f
44// --------------------------------------------------------------------------- 44// ---------------------------------------------------------------------------
45 45
46export { 46export {
47 isValidEditorTasksArray, 47 isValidStudioTasksArray,
48 48
49 isEditorCutTaskValid, 49 isStudioCutTaskValid,
50 isEditorTaskAddIntroOutroValid, 50 isStudioTaskAddIntroOutroValid,
51 isEditorTaskAddWatermarkValid 51 isStudioTaskAddWatermarkValid
52} 52}
diff --git a/server/initializers/checker-after-init.ts b/server/initializers/checker-after-init.ts
index 635a32010..f65798c42 100644
--- a/server/initializers/checker-after-init.ts
+++ b/server/initializers/checker-after-init.ts
@@ -49,7 +49,7 @@ function checkConfig () {
49 checkSearchConfig() 49 checkSearchConfig()
50 checkLiveConfig() 50 checkLiveConfig()
51 checkObjectStorageConfig() 51 checkObjectStorageConfig()
52 checkVideoEditorConfig() 52 checkVideoStudioConfig()
53} 53}
54 54
55// We get db by param to not import it in this file (import orders) 55// We get db by param to not import it in this file (import orders)
@@ -260,8 +260,8 @@ function checkObjectStorageConfig () {
260 } 260 }
261} 261}
262 262
263function checkVideoEditorConfig () { 263function checkVideoStudioConfig () {
264 if (CONFIG.VIDEO_EDITOR.ENABLED === true && CONFIG.TRANSCODING.ENABLED === false) { 264 if (CONFIG.VIDEO_STUDIO.ENABLED === true && CONFIG.TRANSCODING.ENABLED === false) {
265 throw new Error('Video editor cannot be enabled if transcoding is disabled') 265 throw new Error('Video studio cannot be enabled if transcoding is disabled')
266 } 266 }
267} 267}
diff --git a/server/initializers/checker-before-init.ts b/server/initializers/checker-before-init.ts
index fa311f708..0f23a2d73 100644
--- a/server/initializers/checker-before-init.ts
+++ b/server/initializers/checker-before-init.ts
@@ -30,7 +30,7 @@ function checkMissedConfig () {
30 'transcoding.profile', 'transcoding.concurrency', 30 'transcoding.profile', 'transcoding.concurrency',
31 'transcoding.resolutions.0p', 'transcoding.resolutions.144p', 'transcoding.resolutions.240p', 'transcoding.resolutions.360p', 31 'transcoding.resolutions.0p', 'transcoding.resolutions.144p', 'transcoding.resolutions.240p', 'transcoding.resolutions.360p',
32 'transcoding.resolutions.480p', 'transcoding.resolutions.720p', 'transcoding.resolutions.1080p', 'transcoding.resolutions.1440p', 32 'transcoding.resolutions.480p', 'transcoding.resolutions.720p', 'transcoding.resolutions.1080p', 'transcoding.resolutions.1440p',
33 'transcoding.resolutions.2160p', 'video_editor.enabled', 33 'transcoding.resolutions.2160p', 'video_studio.enabled',
34 'import.videos.http.enabled', 'import.videos.torrent.enabled', 'import.videos.concurrency', 'auto_blacklist.videos.of_users.enabled', 34 'import.videos.http.enabled', 'import.videos.torrent.enabled', 'import.videos.concurrency', 'auto_blacklist.videos.of_users.enabled',
35 'trending.videos.interval_days', 35 'trending.videos.interval_days',
36 'client.videos.miniature.display_author_avatar', 36 'client.videos.miniature.display_author_avatar',
diff --git a/server/initializers/config.ts b/server/initializers/config.ts
index 1658298c5..122cb9472 100644
--- a/server/initializers/config.ts
+++ b/server/initializers/config.ts
@@ -335,8 +335,8 @@ const CONFIG = {
335 } 335 }
336 } 336 }
337 }, 337 },
338 VIDEO_EDITOR: { 338 VIDEO_STUDIO: {
339 get ENABLED () { return config.get<boolean>('video_editor.enabled') } 339 get ENABLED () { return config.get<boolean>('video_studio.enabled') }
340 }, 340 },
341 IMPORT: { 341 IMPORT: {
342 VIDEOS: { 342 VIDEOS: {
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index 17d8ba556..6bcefe0db 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -152,7 +152,7 @@ const JOB_ATTEMPTS: { [id in JobType]: number } = {
152 'activitypub-refresher': 1, 152 'activitypub-refresher': 1,
153 'video-redundancy': 1, 153 'video-redundancy': 1,
154 'video-live-ending': 1, 154 'video-live-ending': 1,
155 'video-edition': 1, 155 'video-studio-edition': 1,
156 'manage-video-torrent': 1, 156 'manage-video-torrent': 1,
157 'move-to-object-storage': 3 157 'move-to-object-storage': 3
158} 158}
@@ -170,7 +170,7 @@ const JOB_CONCURRENCY: { [id in Exclude<JobType, 'video-transcoding' | 'video-im
170 'activitypub-refresher': 1, 170 'activitypub-refresher': 1,
171 'video-redundancy': 1, 171 'video-redundancy': 1,
172 'video-live-ending': 10, 172 'video-live-ending': 10,
173 'video-edition': 1, 173 'video-studio-edition': 1,
174 'manage-video-torrent': 1, 174 'manage-video-torrent': 1,
175 'move-to-object-storage': 1 175 'move-to-object-storage': 1
176} 176}
@@ -182,7 +182,7 @@ const JOB_TTL: { [id in JobType]: number } = {
182 'activitypub-cleaner': 1000 * 3600, // 1 hour 182 'activitypub-cleaner': 1000 * 3600, // 1 hour
183 'video-file-import': 1000 * 3600, // 1 hour 183 'video-file-import': 1000 * 3600, // 1 hour
184 'video-transcoding': 1000 * 3600 * 48, // 2 days, transcoding could be long 184 'video-transcoding': 1000 * 3600 * 48, // 2 days, transcoding could be long
185 'video-edition': 1000 * 3600 * 10, // 10 hours 185 'video-studio-edition': 1000 * 3600 * 10, // 10 hours
186 'video-import': 1000 * 3600 * 2, // 2 hours 186 'video-import': 1000 * 3600 * 2, // 2 hours
187 'email': 60000 * 10, // 10 minutes 187 'email': 60000 * 10, // 10 minutes
188 'actor-keys': 60000 * 20, // 20 minutes 188 'actor-keys': 60000 * 20, // 20 minutes
@@ -358,7 +358,7 @@ const CONSTRAINTS_FIELDS = {
358 COMMONS: { 358 COMMONS: {
359 URL: { min: 5, max: 2000 } // Length 359 URL: { min: 5, max: 2000 } // Length
360 }, 360 },
361 VIDEO_EDITOR: { 361 VIDEO_STUDIO: {
362 TASKS: { min: 1, max: 10 }, // Number of tasks 362 TASKS: { min: 1, max: 10 }, // Number of tasks
363 CUT_TIME: { min: 0 } // Value 363 CUT_TIME: { min: 0 } // Value
364 } 364 }
diff --git a/server/initializers/migrations/0700-edition-finished-notification.ts b/server/initializers/migrations/0700-edition-finished-notification.ts
index 103c0b456..5310eab3f 100644
--- a/server/initializers/migrations/0700-edition-finished-notification.ts
+++ b/server/initializers/migrations/0700-edition-finished-notification.ts
@@ -14,11 +14,11 @@ async function up (utils: {
14 defaultValue: null, 14 defaultValue: null,
15 allowNull: true 15 allowNull: true
16 } 16 }
17 await utils.queryInterface.addColumn('userNotificationSetting', 'myVideoEditionFinished', data, { transaction }) 17 await utils.queryInterface.addColumn('userNotificationSetting', 'myVideoStudioEditionFinished', data, { transaction })
18 } 18 }
19 19
20 { 20 {
21 const query = 'UPDATE "userNotificationSetting" SET "myVideoEditionFinished" = 1' 21 const query = 'UPDATE "userNotificationSetting" SET "myVideoStudioEditionFinished" = 1'
22 await utils.sequelize.query(query, { transaction }) 22 await utils.sequelize.query(query, { transaction })
23 } 23 }
24 24
@@ -28,7 +28,7 @@ async function up (utils: {
28 defaultValue: null, 28 defaultValue: null,
29 allowNull: false 29 allowNull: false
30 } 30 }
31 await utils.queryInterface.changeColumn('userNotificationSetting', 'myVideoEditionFinished', data, { transaction }) 31 await utils.queryInterface.changeColumn('userNotificationSetting', 'myVideoStudioEditionFinished', data, { transaction })
32 } 32 }
33} 33}
34 34
diff --git a/server/lib/job-queue/handlers/video-edition.ts b/server/lib/job-queue/handlers/video-studio-edition.ts
index d2d2a4f65..cf3064a7a 100644
--- a/server/lib/job-queue/handlers/video-edition.ts
+++ b/server/lib/job-queue/handlers/video-studio-edition.ts
@@ -9,8 +9,8 @@ import { generateWebTorrentVideoFilename } from '@server/lib/paths'
9import { VideoTranscodingProfilesManager } from '@server/lib/transcoding/default-transcoding-profiles' 9import { VideoTranscodingProfilesManager } from '@server/lib/transcoding/default-transcoding-profiles'
10import { isAbleToUploadVideo } from '@server/lib/user' 10import { isAbleToUploadVideo } from '@server/lib/user'
11import { addOptimizeOrMergeAudioJob } from '@server/lib/video' 11import { addOptimizeOrMergeAudioJob } from '@server/lib/video'
12import { approximateIntroOutroAdditionalSize } from '@server/lib/video-editor'
13import { VideoPathManager } from '@server/lib/video-path-manager' 12import { VideoPathManager } from '@server/lib/video-path-manager'
13import { approximateIntroOutroAdditionalSize } from '@server/lib/video-studio'
14import { UserModel } from '@server/models/user/user' 14import { UserModel } from '@server/models/user/user'
15import { VideoModel } from '@server/models/video/video' 15import { VideoModel } from '@server/models/video/video'
16import { VideoFileModel } from '@server/models/video/video-file' 16import { VideoFileModel } from '@server/models/video/video-file'
@@ -26,23 +26,23 @@ import {
26 getVideoStreamFPS 26 getVideoStreamFPS
27} from '@shared/extra-utils' 27} from '@shared/extra-utils'
28import { 28import {
29 VideoEditionPayload, 29 VideoStudioEditionPayload,
30 VideoEditionTaskPayload, 30 VideoStudioTaskPayload,
31 VideoEditorTask, 31 VideoStudioTaskCutPayload,
32 VideoEditorTaskCutPayload, 32 VideoStudioTaskIntroPayload,
33 VideoEditorTaskIntroPayload, 33 VideoStudioTaskOutroPayload,
34 VideoEditorTaskOutroPayload, 34 VideoStudioTaskWatermarkPayload,
35 VideoEditorTaskWatermarkPayload 35 VideoStudioTask
36} from '@shared/models' 36} from '@shared/models'
37import { logger, loggerTagsFactory } from '../../../helpers/logger' 37import { logger, loggerTagsFactory } from '../../../helpers/logger'
38 38
39const lTagsBase = loggerTagsFactory('video-edition') 39const lTagsBase = loggerTagsFactory('video-edition')
40 40
41async function processVideoEdition (job: Job) { 41async function processVideoStudioEdition (job: Job) {
42 const payload = job.data as VideoEditionPayload 42 const payload = job.data as VideoStudioEditionPayload
43 const lTags = lTagsBase(payload.videoUUID) 43 const lTags = lTagsBase(payload.videoUUID)
44 44
45 logger.info('Process video edition of %s in job %d.', payload.videoUUID, job.id, lTags) 45 logger.info('Process video studio edition of %s in job %d.', payload.videoUUID, job.id, lTags)
46 46
47 const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(payload.videoUUID) 47 const video = await VideoModel.loadAndPopulateAccountAndServerAndTags(payload.videoUUID)
48 48
@@ -106,12 +106,12 @@ async function processVideoEdition (job: Job) {
106// --------------------------------------------------------------------------- 106// ---------------------------------------------------------------------------
107 107
108export { 108export {
109 processVideoEdition 109 processVideoStudioEdition
110} 110}
111 111
112// --------------------------------------------------------------------------- 112// ---------------------------------------------------------------------------
113 113
114type TaskProcessorOptions <T extends VideoEditionTaskPayload = VideoEditionTaskPayload> = { 114type TaskProcessorOptions <T extends VideoStudioTaskPayload = VideoStudioTaskPayload> = {
115 inputPath: string 115 inputPath: string
116 outputPath: string 116 outputPath: string
117 video: MVideo 117 video: MVideo
@@ -119,7 +119,7 @@ type TaskProcessorOptions <T extends VideoEditionTaskPayload = VideoEditionTaskP
119 lTags: { tags: string[] } 119 lTags: { tags: string[] }
120} 120}
121 121
122const taskProcessors: { [id in VideoEditorTask['name']]: (options: TaskProcessorOptions) => Promise<any> } = { 122const taskProcessors: { [id in VideoStudioTask['name']]: (options: TaskProcessorOptions) => Promise<any> } = {
123 'add-intro': processAddIntroOutro, 123 'add-intro': processAddIntroOutro,
124 'add-outro': processAddIntroOutro, 124 'add-outro': processAddIntroOutro,
125 'cut': processCut, 125 'cut': processCut,
@@ -137,7 +137,7 @@ async function processTask (options: TaskProcessorOptions) {
137 return processor(options) 137 return processor(options)
138} 138}
139 139
140function processAddIntroOutro (options: TaskProcessorOptions<VideoEditorTaskIntroPayload | VideoEditorTaskOutroPayload>) { 140function processAddIntroOutro (options: TaskProcessorOptions<VideoStudioTaskIntroPayload | VideoStudioTaskOutroPayload>) {
141 const { task } = options 141 const { task } = options
142 142
143 return addIntroOutro({ 143 return addIntroOutro({
@@ -153,7 +153,7 @@ function processAddIntroOutro (options: TaskProcessorOptions<VideoEditorTaskIntr
153 }) 153 })
154} 154}
155 155
156function processCut (options: TaskProcessorOptions<VideoEditorTaskCutPayload>) { 156function processCut (options: TaskProcessorOptions<VideoStudioTaskCutPayload>) {
157 const { task } = options 157 const { task } = options
158 158
159 return cutVideo({ 159 return cutVideo({
@@ -164,7 +164,7 @@ function processCut (options: TaskProcessorOptions<VideoEditorTaskCutPayload>) {
164 }) 164 })
165} 165}
166 166
167function processAddWatermark (options: TaskProcessorOptions<VideoEditorTaskWatermarkPayload>) { 167function processAddWatermark (options: TaskProcessorOptions<VideoStudioTaskWatermarkPayload>) {
168 const { task } = options 168 const { task } = options
169 169
170 return addWatermark({ 170 return addWatermark({
@@ -212,10 +212,10 @@ async function removeAllFiles (video: MVideoWithAllFiles, webTorrentFileExceptio
212 } 212 }
213} 213}
214 214
215async function checkUserQuotaOrThrow (video: MVideoFullLight, payload: VideoEditionPayload) { 215async function checkUserQuotaOrThrow (video: MVideoFullLight, payload: VideoStudioEditionPayload) {
216 const user = await UserModel.loadByVideoId(video.id) 216 const user = await UserModel.loadByVideoId(video.id)
217 217
218 const filePathFinder = (i: number) => (payload.tasks[i] as VideoEditorTaskIntroPayload | VideoEditorTaskOutroPayload).options.file 218 const filePathFinder = (i: number) => (payload.tasks[i] as VideoStudioTaskIntroPayload | VideoStudioTaskOutroPayload).options.file
219 219
220 const additionalBytes = await approximateIntroOutroAdditionalSize(video, payload.tasks, filePathFinder) 220 const additionalBytes = await approximateIntroOutroAdditionalSize(video, payload.tasks, filePathFinder)
221 if (await isAbleToUploadVideo(user.id, additionalBytes) === false) { 221 if (await isAbleToUploadVideo(user.id, additionalBytes) === false) {
diff --git a/server/lib/job-queue/job-queue.ts b/server/lib/job-queue/job-queue.ts
index 3224abcc3..167b7b168 100644
--- a/server/lib/job-queue/job-queue.ts
+++ b/server/lib/job-queue/job-queue.ts
@@ -15,11 +15,11 @@ import {
15 ManageVideoTorrentPayload, 15 ManageVideoTorrentPayload,
16 MoveObjectStoragePayload, 16 MoveObjectStoragePayload,
17 RefreshPayload, 17 RefreshPayload,
18 VideoEditionPayload,
19 VideoFileImportPayload, 18 VideoFileImportPayload,
20 VideoImportPayload, 19 VideoImportPayload,
21 VideoLiveEndingPayload, 20 VideoLiveEndingPayload,
22 VideoRedundancyPayload, 21 VideoRedundancyPayload,
22 VideoStudioEditionPayload,
23 VideoTranscodingPayload 23 VideoTranscodingPayload
24} from '../../../shared/models' 24} from '../../../shared/models'
25import { logger } from '../../helpers/logger' 25import { logger } from '../../helpers/logger'
@@ -34,10 +34,10 @@ import { processActorKeys } from './handlers/actor-keys'
34import { processEmail } from './handlers/email' 34import { processEmail } from './handlers/email'
35import { processManageVideoTorrent } from './handlers/manage-video-torrent' 35import { processManageVideoTorrent } from './handlers/manage-video-torrent'
36import { processMoveToObjectStorage } from './handlers/move-to-object-storage' 36import { processMoveToObjectStorage } from './handlers/move-to-object-storage'
37import { processVideoEdition } from './handlers/video-edition'
38import { processVideoFileImport } from './handlers/video-file-import' 37import { processVideoFileImport } from './handlers/video-file-import'
39import { processVideoImport } from './handlers/video-import' 38import { processVideoImport } from './handlers/video-import'
40import { processVideoLiveEnding } from './handlers/video-live-ending' 39import { processVideoLiveEnding } from './handlers/video-live-ending'
40import { processVideoStudioEdition } from './handlers/video-studio-edition'
41import { processVideoTranscoding } from './handlers/video-transcoding' 41import { processVideoTranscoding } from './handlers/video-transcoding'
42import { processVideosViewsStats } from './handlers/video-views-stats' 42import { processVideosViewsStats } from './handlers/video-views-stats'
43 43
@@ -57,7 +57,7 @@ type CreateJobArgument =
57 { type: 'actor-keys', payload: ActorKeysPayload } | 57 { type: 'actor-keys', payload: ActorKeysPayload } |
58 { type: 'video-redundancy', payload: VideoRedundancyPayload } | 58 { type: 'video-redundancy', payload: VideoRedundancyPayload } |
59 { type: 'delete-resumable-upload-meta-file', payload: DeleteResumableUploadMetaFilePayload } | 59 { type: 'delete-resumable-upload-meta-file', payload: DeleteResumableUploadMetaFilePayload } |
60 { type: 'video-edition', payload: VideoEditionPayload } | 60 { type: 'video-studio-edition', payload: VideoStudioEditionPayload } |
61 { type: 'manage-video-torrent', payload: ManageVideoTorrentPayload } | 61 { type: 'manage-video-torrent', payload: ManageVideoTorrentPayload } |
62 { type: 'move-to-object-storage', payload: MoveObjectStoragePayload } 62 { type: 'move-to-object-storage', payload: MoveObjectStoragePayload }
63 63
@@ -83,7 +83,7 @@ const handlers: { [id in JobType]: (job: Job) => Promise<any> } = {
83 'video-redundancy': processVideoRedundancy, 83 'video-redundancy': processVideoRedundancy,
84 'move-to-object-storage': processMoveToObjectStorage, 84 'move-to-object-storage': processMoveToObjectStorage,
85 'manage-video-torrent': processManageVideoTorrent, 85 'manage-video-torrent': processManageVideoTorrent,
86 'video-edition': processVideoEdition 86 'video-studio-edition': processVideoStudioEdition
87} 87}
88 88
89const jobTypes: JobType[] = [ 89const jobTypes: JobType[] = [
@@ -103,7 +103,7 @@ const jobTypes: JobType[] = [
103 'video-live-ending', 103 'video-live-ending',
104 'move-to-object-storage', 104 'move-to-object-storage',
105 'manage-video-torrent', 105 'manage-video-torrent',
106 'video-edition' 106 'video-studio-edition'
107] 107]
108 108
109class JobQueue { 109class JobQueue {
diff --git a/server/lib/notifier/notifier.ts b/server/lib/notifier/notifier.ts
index e34a82603..a6f13780b 100644
--- a/server/lib/notifier/notifier.ts
+++ b/server/lib/notifier/notifier.ts
@@ -12,7 +12,7 @@ import {
12 AbuseStateChangeForReporter, 12 AbuseStateChangeForReporter,
13 AutoFollowForInstance, 13 AutoFollowForInstance,
14 CommentMention, 14 CommentMention,
15 EditionFinishedForOwner, 15 StudioEditionFinishedForOwner,
16 FollowForInstance, 16 FollowForInstance,
17 FollowForUser, 17 FollowForUser,
18 ImportFinishedForOwner, 18 ImportFinishedForOwner,
@@ -55,7 +55,7 @@ class Notifier {
55 newAbuseMessage: [ NewAbuseMessageForReporter, NewAbuseMessageForModerators ], 55 newAbuseMessage: [ NewAbuseMessageForReporter, NewAbuseMessageForModerators ],
56 newPeertubeVersion: [ NewPeerTubeVersionForAdmins ], 56 newPeertubeVersion: [ NewPeerTubeVersionForAdmins ],
57 newPluginVersion: [ NewPluginVersionForAdmins ], 57 newPluginVersion: [ NewPluginVersionForAdmins ],
58 videoEditionFinished: [ EditionFinishedForOwner ] 58 videoStudioEditionFinished: [ StudioEditionFinishedForOwner ]
59 } 59 }
60 60
61 private static instance: Notifier 61 private static instance: Notifier
@@ -200,11 +200,11 @@ class Notifier {
200 .catch(err => logger.error('Cannot notify on new plugin version %s.', plugin.name, { err })) 200 .catch(err => logger.error('Cannot notify on new plugin version %s.', plugin.name, { err }))
201 } 201 }
202 202
203 notifyOfFinishedVideoEdition (video: MVideoFullLight) { 203 notifyOfFinishedVideoStudioEdition (video: MVideoFullLight) {
204 const models = this.notificationModels.videoEditionFinished 204 const models = this.notificationModels.videoStudioEditionFinished
205 205
206 this.sendNotifications(models, video) 206 this.sendNotifications(models, video)
207 .catch(err => logger.error('Cannot notify on finished edition %s.', video.url, { err })) 207 .catch(err => logger.error('Cannot notify on finished studio edition %s.', video.url, { err }))
208 } 208 }
209 209
210 private async notify <T> (object: AbstractNotification<T>) { 210 private async notify <T> (object: AbstractNotification<T>) {
diff --git a/server/lib/notifier/shared/video-publication/index.ts b/server/lib/notifier/shared/video-publication/index.ts
index 57f3443b9..5e92cb011 100644
--- a/server/lib/notifier/shared/video-publication/index.ts
+++ b/server/lib/notifier/shared/video-publication/index.ts
@@ -1,6 +1,6 @@
1export * from './new-video-for-subscribers' 1export * from './new-video-for-subscribers'
2export * from './edition-finished-for-owner'
3export * from './import-finished-for-owner' 2export * from './import-finished-for-owner'
4export * from './owned-publication-after-auto-unblacklist' 3export * from './owned-publication-after-auto-unblacklist'
5export * from './owned-publication-after-schedule-update' 4export * from './owned-publication-after-schedule-update'
6export * from './owned-publication-after-transcoding' 5export * from './owned-publication-after-transcoding'
6export * from './studio-edition-finished-for-owner'
diff --git a/server/lib/notifier/shared/video-publication/edition-finished-for-owner.ts b/server/lib/notifier/shared/video-publication/studio-edition-finished-for-owner.ts
index dec91f574..ee3027245 100644
--- a/server/lib/notifier/shared/video-publication/edition-finished-for-owner.ts
+++ b/server/lib/notifier/shared/video-publication/studio-edition-finished-for-owner.ts
@@ -6,7 +6,7 @@ import { MUserDefault, MUserWithNotificationSetting, MVideoFullLight, UserNotifi
6import { UserNotificationType } from '@shared/models' 6import { UserNotificationType } from '@shared/models'
7import { AbstractNotification } from '../common/abstract-notification' 7import { AbstractNotification } from '../common/abstract-notification'
8 8
9export class EditionFinishedForOwner extends AbstractNotification <MVideoFullLight> { 9export class StudioEditionFinishedForOwner extends AbstractNotification <MVideoFullLight> {
10 private user: MUserDefault 10 private user: MUserDefault
11 11
12 async prepare () { 12 async prepare () {
@@ -14,11 +14,11 @@ export class EditionFinishedForOwner extends AbstractNotification <MVideoFullLig
14 } 14 }
15 15
16 log () { 16 log () {
17 logger.info('Notifying user %s its video edition %s is finished.', this.user.username, this.payload.url) 17 logger.info('Notifying user %s its video studio edition %s is finished.', this.user.username, this.payload.url)
18 } 18 }
19 19
20 getSetting (user: MUserWithNotificationSetting) { 20 getSetting (user: MUserWithNotificationSetting) {
21 return user.NotificationSetting.myVideoEditionFinished 21 return user.NotificationSetting.myVideoStudioEditionFinished
22 } 22 }
23 23
24 getTargetUsers () { 24 getTargetUsers () {
@@ -29,7 +29,7 @@ export class EditionFinishedForOwner extends AbstractNotification <MVideoFullLig
29 29
30 async createNotification (user: MUserWithNotificationSetting) { 30 async createNotification (user: MUserWithNotificationSetting) {
31 const notification = await UserNotificationModel.create<UserNotificationModelForApi>({ 31 const notification = await UserNotificationModel.create<UserNotificationModelForApi>({
32 type: UserNotificationType.MY_VIDEO_EDITION_FINISHED, 32 type: UserNotificationType.MY_VIDEO_STUDIO_EDITION_FINISHED,
33 userId: user.id, 33 userId: user.id,
34 videoId: this.payload.id 34 videoId: this.payload.id
35 }) 35 })
diff --git a/server/lib/server-config-manager.ts b/server/lib/server-config-manager.ts
index b920b73d5..d16a88f65 100644
--- a/server/lib/server-config-manager.ts
+++ b/server/lib/server-config-manager.ts
@@ -159,8 +159,8 @@ class ServerConfigManager {
159 port: CONFIG.LIVE.RTMP.PORT 159 port: CONFIG.LIVE.RTMP.PORT
160 } 160 }
161 }, 161 },
162 videoEditor: { 162 videoStudio: {
163 enabled: CONFIG.VIDEO_EDITOR.ENABLED 163 enabled: CONFIG.VIDEO_STUDIO.ENABLED
164 }, 164 },
165 import: { 165 import: {
166 videos: { 166 videos: {
diff --git a/server/lib/user.ts b/server/lib/user.ts
index 173d89d0b..310a3c30c 100644
--- a/server/lib/user.ts
+++ b/server/lib/user.ts
@@ -253,7 +253,7 @@ function createDefaultUserNotificationSettings (user: MUserId, t: Transaction |
253 autoInstanceFollowing: UserNotificationSettingValue.WEB, 253 autoInstanceFollowing: UserNotificationSettingValue.WEB,
254 newPeerTubeVersion: UserNotificationSettingValue.WEB | UserNotificationSettingValue.EMAIL, 254 newPeerTubeVersion: UserNotificationSettingValue.WEB | UserNotificationSettingValue.EMAIL,
255 newPluginVersion: UserNotificationSettingValue.WEB, 255 newPluginVersion: UserNotificationSettingValue.WEB,
256 myVideoEditionFinished: UserNotificationSettingValue.WEB 256 myVideoStudioEditionFinished: UserNotificationSettingValue.WEB
257 } 257 }
258 258
259 return UserNotificationSettingModel.create(values, { transaction: t }) 259 return UserNotificationSettingModel.create(values, { transaction: t })
diff --git a/server/lib/video-state.ts b/server/lib/video-state.ts
index f75f81704..7b207eb87 100644
--- a/server/lib/video-state.ts
+++ b/server/lib/video-state.ts
@@ -135,7 +135,7 @@ async function moveToPublishedState (options: {
135 await federateVideoIfNeeded(video, isNewVideo, transaction) 135 await federateVideoIfNeeded(video, isNewVideo, transaction)
136 136
137 if (previousState === VideoState.TO_EDIT) { 137 if (previousState === VideoState.TO_EDIT) {
138 Notifier.Instance.notifyOfFinishedVideoEdition(video) 138 Notifier.Instance.notifyOfFinishedVideoStudioEdition(video)
139 return 139 return
140 } 140 }
141 141
diff --git a/server/lib/video-editor.ts b/server/lib/video-studio.ts
index 99b0bd949..cdacd35f2 100644
--- a/server/lib/video-editor.ts
+++ b/server/lib/video-studio.ts
@@ -1,6 +1,6 @@
1import { MVideoFullLight } from "@server/types/models" 1import { MVideoFullLight } from '@server/types/models'
2import { getVideoStreamDuration } from "@shared/extra-utils" 2import { getVideoStreamDuration } from '@shared/extra-utils'
3import { VideoEditorTask } from "@shared/models" 3import { VideoStudioTask } from '@shared/models'
4 4
5function buildTaskFileFieldname (indice: number, fieldName = 'file') { 5function buildTaskFileFieldname (indice: number, fieldName = 'file') {
6 return `tasks[${indice}][options][${fieldName}]` 6 return `tasks[${indice}][options][${fieldName}]`
@@ -10,7 +10,7 @@ function getTaskFile (files: Express.Multer.File[], indice: number, fieldName =
10 return files.find(f => f.fieldname === buildTaskFileFieldname(indice, fieldName)) 10 return files.find(f => f.fieldname === buildTaskFileFieldname(indice, fieldName))
11} 11}
12 12
13async function approximateIntroOutroAdditionalSize (video: MVideoFullLight, tasks: VideoEditorTask[], fileFinder: (i: number) => string) { 13async function approximateIntroOutroAdditionalSize (video: MVideoFullLight, tasks: VideoStudioTask[], fileFinder: (i: number) => string) {
14 let additionalDuration = 0 14 let additionalDuration = 0
15 15
16 for (let i = 0; i < tasks.length; i++) { 16 for (let i = 0; i < tasks.length; i++) {
diff --git a/server/middlewares/validators/config.ts b/server/middlewares/validators/config.ts
index e87b2e39d..1e839d577 100644
--- a/server/middlewares/validators/config.ts
+++ b/server/middlewares/validators/config.ts
@@ -57,7 +57,7 @@ const customConfigUpdateValidator = [
57 body('transcoding.webtorrent.enabled').isBoolean().withMessage('Should have a valid webtorrent transcoding enabled boolean'), 57 body('transcoding.webtorrent.enabled').isBoolean().withMessage('Should have a valid webtorrent transcoding enabled boolean'),
58 body('transcoding.hls.enabled').isBoolean().withMessage('Should have a valid hls transcoding enabled boolean'), 58 body('transcoding.hls.enabled').isBoolean().withMessage('Should have a valid hls transcoding enabled boolean'),
59 59
60 body('videoEditor.enabled').isBoolean().withMessage('Should have a valid video editor enabled boolean'), 60 body('videoStudio.enabled').isBoolean().withMessage('Should have a valid video studio enabled boolean'),
61 61
62 body('import.videos.concurrency').isInt({ min: 0 }).withMessage('Should have a valid import concurrency number'), 62 body('import.videos.concurrency').isInt({ min: 0 }).withMessage('Should have a valid import concurrency number'),
63 body('import.videos.http.enabled').isBoolean().withMessage('Should have a valid import video http enabled boolean'), 63 body('import.videos.http.enabled').isBoolean().withMessage('Should have a valid import video http enabled boolean'),
@@ -106,7 +106,7 @@ const customConfigUpdateValidator = [
106 if (!checkInvalidConfigIfEmailDisabled(req.body, res)) return 106 if (!checkInvalidConfigIfEmailDisabled(req.body, res)) return
107 if (!checkInvalidTranscodingConfig(req.body, res)) return 107 if (!checkInvalidTranscodingConfig(req.body, res)) return
108 if (!checkInvalidLiveConfig(req.body, res)) return 108 if (!checkInvalidLiveConfig(req.body, res)) return
109 if (!checkInvalidVideoEditorConfig(req.body, res)) return 109 if (!checkInvalidVideoStudioConfig(req.body, res)) return
110 110
111 return next() 111 return next()
112 } 112 }
@@ -163,11 +163,11 @@ function checkInvalidLiveConfig (customConfig: CustomConfig, res: express.Respon
163 return true 163 return true
164} 164}
165 165
166function checkInvalidVideoEditorConfig (customConfig: CustomConfig, res: express.Response) { 166function checkInvalidVideoStudioConfig (customConfig: CustomConfig, res: express.Response) {
167 if (customConfig.videoEditor.enabled === false) return true 167 if (customConfig.videoStudio.enabled === false) return true
168 168
169 if (customConfig.videoEditor.enabled === true && customConfig.transcoding.enabled === false) { 169 if (customConfig.videoStudio.enabled === true && customConfig.transcoding.enabled === false) {
170 res.fail({ message: 'You cannot enable video editor if transcoding is not enabled' }) 170 res.fail({ message: 'You cannot enable video studio if transcoding is not enabled' })
171 return false 171 return false
172 } 172 }
173 173
diff --git a/server/middlewares/validators/videos/index.ts b/server/middlewares/validators/videos/index.ts
index faa082510..c7dea4b3d 100644
--- a/server/middlewares/validators/videos/index.ts
+++ b/server/middlewares/validators/videos/index.ts
@@ -2,7 +2,6 @@ export * from './video-blacklist'
2export * from './video-captions' 2export * from './video-captions'
3export * from './video-channels' 3export * from './video-channels'
4export * from './video-comments' 4export * from './video-comments'
5export * from './video-editor'
6export * from './video-files' 5export * from './video-files'
7export * from './video-imports' 6export * from './video-imports'
8export * from './video-live' 7export * from './video-live'
@@ -10,5 +9,6 @@ export * from './video-ownership-changes'
10export * from './video-watch' 9export * from './video-watch'
11export * from './video-rates' 10export * from './video-rates'
12export * from './video-shares' 11export * from './video-shares'
12export * from './video-studio'
13export * from './video-transcoding' 13export * from './video-transcoding'
14export * from './videos' 14export * from './videos'
diff --git a/server/middlewares/validators/videos/video-editor.ts b/server/middlewares/validators/videos/video-studio.ts
index 9be97be93..af7fe2283 100644
--- a/server/middlewares/validators/videos/video-editor.ts
+++ b/server/middlewares/validators/videos/video-studio.ts
@@ -2,31 +2,31 @@ import express from 'express'
2import { body, param } from 'express-validator' 2import { body, param } from 'express-validator'
3import { isIdOrUUIDValid } from '@server/helpers/custom-validators/misc' 3import { isIdOrUUIDValid } from '@server/helpers/custom-validators/misc'
4import { 4import {
5 isEditorCutTaskValid, 5 isStudioCutTaskValid,
6 isEditorTaskAddIntroOutroValid, 6 isStudioTaskAddIntroOutroValid,
7 isEditorTaskAddWatermarkValid, 7 isStudioTaskAddWatermarkValid,
8 isValidEditorTasksArray 8 isValidStudioTasksArray
9} from '@server/helpers/custom-validators/video-editor' 9} from '@server/helpers/custom-validators/video-studio'
10import { cleanUpReqFiles } from '@server/helpers/express-utils' 10import { cleanUpReqFiles } from '@server/helpers/express-utils'
11import { CONFIG } from '@server/initializers/config' 11import { CONFIG } from '@server/initializers/config'
12import { approximateIntroOutroAdditionalSize, getTaskFile } from '@server/lib/video-editor' 12import { approximateIntroOutroAdditionalSize, getTaskFile } from '@server/lib/video-studio'
13import { isAudioFile } from '@shared/extra-utils' 13import { isAudioFile } from '@shared/extra-utils'
14import { HttpStatusCode, UserRight, VideoEditorCreateEdition, VideoEditorTask, VideoState } from '@shared/models' 14import { HttpStatusCode, UserRight, VideoState, VideoStudioCreateEdition, VideoStudioTask } from '@shared/models'
15import { logger } from '../../../helpers/logger' 15import { logger } from '../../../helpers/logger'
16import { areValidationErrors, checkUserCanManageVideo, checkUserQuota, doesVideoExist } from '../shared' 16import { areValidationErrors, checkUserCanManageVideo, checkUserQuota, doesVideoExist } from '../shared'
17 17
18const videosEditorAddEditionValidator = [ 18const videoStudioAddEditionValidator = [
19 param('videoId').custom(isIdOrUUIDValid).withMessage('Should have a valid video id/uuid'), 19 param('videoId').custom(isIdOrUUIDValid).withMessage('Should have a valid video id/uuid'),
20 20
21 body('tasks').custom(isValidEditorTasksArray).withMessage('Should have a valid array of tasks'), 21 body('tasks').custom(isValidStudioTasksArray).withMessage('Should have a valid array of tasks'),
22 22
23 async (req: express.Request, res: express.Response, next: express.NextFunction) => { 23 async (req: express.Request, res: express.Response, next: express.NextFunction) => {
24 logger.debug('Checking videosEditorAddEditionValidator parameters.', { parameters: req.params, body: req.body, files: req.files }) 24 logger.debug('Checking videoStudioAddEditionValidator parameters.', { parameters: req.params, body: req.body, files: req.files })
25 25
26 if (CONFIG.VIDEO_EDITOR.ENABLED !== true) { 26 if (CONFIG.VIDEO_STUDIO.ENABLED !== true) {
27 res.fail({ 27 res.fail({
28 status: HttpStatusCode.BAD_REQUEST_400, 28 status: HttpStatusCode.BAD_REQUEST_400,
29 message: 'Video editor is disabled on this instance' 29 message: 'Video studio is disabled on this instance'
30 }) 30 })
31 31
32 return cleanUpReqFiles(req) 32 return cleanUpReqFiles(req)
@@ -34,7 +34,7 @@ const videosEditorAddEditionValidator = [
34 34
35 if (areValidationErrors(req, res)) return cleanUpReqFiles(req) 35 if (areValidationErrors(req, res)) return cleanUpReqFiles(req)
36 36
37 const body: VideoEditorCreateEdition = req.body 37 const body: VideoStudioCreateEdition = req.body
38 const files = req.files as Express.Multer.File[] 38 const files = req.files as Express.Multer.File[]
39 39
40 for (let i = 0; i < body.tasks.length; i++) { 40 for (let i = 0; i < body.tasks.length; i++) {
@@ -90,21 +90,21 @@ const videosEditorAddEditionValidator = [
90// --------------------------------------------------------------------------- 90// ---------------------------------------------------------------------------
91 91
92export { 92export {
93 videosEditorAddEditionValidator 93 videoStudioAddEditionValidator
94} 94}
95 95
96// --------------------------------------------------------------------------- 96// ---------------------------------------------------------------------------
97 97
98const taskCheckers: { 98const taskCheckers: {
99 [id in VideoEditorTask['name']]: (task: VideoEditorTask, indice?: number, files?: Express.Multer.File[]) => boolean 99 [id in VideoStudioTask['name']]: (task: VideoStudioTask, indice?: number, files?: Express.Multer.File[]) => boolean
100} = { 100} = {
101 'cut': isEditorCutTaskValid, 101 'cut': isStudioCutTaskValid,
102 'add-intro': isEditorTaskAddIntroOutroValid, 102 'add-intro': isStudioTaskAddIntroOutroValid,
103 'add-outro': isEditorTaskAddIntroOutroValid, 103 'add-outro': isStudioTaskAddIntroOutroValid,
104 'add-watermark': isEditorTaskAddWatermarkValid 104 'add-watermark': isStudioTaskAddWatermarkValid
105} 105}
106 106
107function checkTask (req: express.Request, task: VideoEditorTask, indice?: number) { 107function checkTask (req: express.Request, task: VideoStudioTask, indice?: number) {
108 const checker = taskCheckers[task.name] 108 const checker = taskCheckers[task.name]
109 if (!checker) return false 109 if (!checker) return false
110 110
diff --git a/server/models/user/user-notification-setting.ts b/server/models/user/user-notification-setting.ts
index b144f8377..66e1d85b3 100644
--- a/server/models/user/user-notification-setting.ts
+++ b/server/models/user/user-notification-setting.ts
@@ -178,11 +178,11 @@ export class UserNotificationSettingModel extends Model<Partial<AttributesOnly<U
178 @AllowNull(false) 178 @AllowNull(false)
179 @Default(null) 179 @Default(null)
180 @Is( 180 @Is(
181 'UserNotificationSettingMyVideoEditionFinished', 181 'UserNotificationSettingMyVideoStudioEditionFinished',
182 value => throwIfNotValid(value, isUserNotificationSettingValid, 'myVideoEditionFinished') 182 value => throwIfNotValid(value, isUserNotificationSettingValid, 'myVideoStudioEditionFinished')
183 ) 183 )
184 @Column 184 @Column
185 myVideoEditionFinished: UserNotificationSettingValue 185 myVideoStudioEditionFinished: UserNotificationSettingValue
186 186
187 @ForeignKey(() => UserModel) 187 @ForeignKey(() => UserModel)
188 @Column 188 @Column
@@ -225,7 +225,7 @@ export class UserNotificationSettingModel extends Model<Partial<AttributesOnly<U
225 abuseNewMessage: this.abuseNewMessage, 225 abuseNewMessage: this.abuseNewMessage,
226 abuseStateChange: this.abuseStateChange, 226 abuseStateChange: this.abuseStateChange,
227 newPeerTubeVersion: this.newPeerTubeVersion, 227 newPeerTubeVersion: this.newPeerTubeVersion,
228 myVideoEditionFinished: this.myVideoEditionFinished, 228 myVideoStudioEditionFinished: this.myVideoStudioEditionFinished,
229 newPluginVersion: this.newPluginVersion 229 newPluginVersion: this.newPluginVersion
230 } 230 }
231 } 231 }
diff --git a/server/tests/api/check-params/config.ts b/server/tests/api/check-params/config.ts
index 900f642c2..c8dbbf797 100644
--- a/server/tests/api/check-params/config.ts
+++ b/server/tests/api/check-params/config.ts
@@ -148,7 +148,7 @@ describe('Test config API validators', function () {
148 } 148 }
149 } 149 }
150 }, 150 },
151 videoEditor: { 151 videoStudio: {
152 enabled: true 152 enabled: true
153 }, 153 },
154 import: { 154 import: {
diff --git a/server/tests/api/check-params/index.ts b/server/tests/api/check-params/index.ts
index c088b52cd..c9adeef4a 100644
--- a/server/tests/api/check-params/index.ts
+++ b/server/tests/api/check-params/index.ts
@@ -25,7 +25,7 @@ import './video-blacklist'
25import './video-captions' 25import './video-captions'
26import './video-channels' 26import './video-channels'
27import './video-comments' 27import './video-comments'
28import './video-editor' 28import './video-studio'
29import './video-imports' 29import './video-imports'
30import './video-playlists' 30import './video-playlists'
31import './videos' 31import './videos'
diff --git a/server/tests/api/check-params/user-notifications.ts b/server/tests/api/check-params/user-notifications.ts
index 93355e8b3..7fbe4271b 100644
--- a/server/tests/api/check-params/user-notifications.ts
+++ b/server/tests/api/check-params/user-notifications.ts
@@ -171,7 +171,7 @@ describe('Test user notifications API validators', function () {
171 abuseNewMessage: UserNotificationSettingValue.WEB, 171 abuseNewMessage: UserNotificationSettingValue.WEB,
172 abuseStateChange: UserNotificationSettingValue.WEB, 172 abuseStateChange: UserNotificationSettingValue.WEB,
173 newPeerTubeVersion: UserNotificationSettingValue.WEB, 173 newPeerTubeVersion: UserNotificationSettingValue.WEB,
174 myVideoEditionFinished: UserNotificationSettingValue.WEB, 174 myVideoStudioEditionFinished: UserNotificationSettingValue.WEB,
175 newPluginVersion: UserNotificationSettingValue.WEB 175 newPluginVersion: UserNotificationSettingValue.WEB
176 } 176 }
177 177
diff --git a/server/tests/api/check-params/video-editor.ts b/server/tests/api/check-params/video-studio.ts
index 5f5faf8fb..9ca55d095 100644
--- a/server/tests/api/check-params/video-editor.ts
+++ b/server/tests/api/check-params/video-studio.ts
@@ -1,19 +1,19 @@
1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ 1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
2 2
3import 'mocha' 3import 'mocha'
4import { HttpStatusCode, VideoEditorTask } from '@shared/models' 4import { HttpStatusCode, VideoStudioTask } from '@shared/models'
5import { 5import {
6 cleanupTests, 6 cleanupTests,
7 createSingleServer, 7 createSingleServer,
8 PeerTubeServer, 8 PeerTubeServer,
9 setAccessTokensToServers, 9 setAccessTokensToServers,
10 VideoEditorCommand, 10 VideoStudioCommand,
11 waitJobs 11 waitJobs
12} from '@shared/server-commands' 12} from '@shared/server-commands'
13 13
14describe('Test video editor API validator', function () { 14describe('Test video studio API validator', function () {
15 let server: PeerTubeServer 15 let server: PeerTubeServer
16 let command: VideoEditorCommand 16 let command: VideoStudioCommand
17 let userAccessToken: string 17 let userAccessToken: string
18 let videoUUID: string 18 let videoUUID: string
19 19
@@ -32,7 +32,7 @@ describe('Test video editor API validator', function () {
32 const { uuid } = await server.videos.quickUpload({ name: 'video' }) 32 const { uuid } = await server.videos.quickUpload({ name: 'video' })
33 videoUUID = uuid 33 videoUUID = uuid
34 34
35 command = server.videoEditor 35 command = server.videoStudio
36 36
37 await waitJobs([ server ]) 37 await waitJobs([ server ])
38 }) 38 })
@@ -41,10 +41,10 @@ describe('Test video editor API validator', function () {
41 41
42 describe('Config settings', function () { 42 describe('Config settings', function () {
43 43
44 it('Should fail if editor is disabled', async function () { 44 it('Should fail if studio is disabled', async function () {
45 await server.config.updateExistingSubConfig({ 45 await server.config.updateExistingSubConfig({
46 newConfig: { 46 newConfig: {
47 videoEditor: { 47 videoStudio: {
48 enabled: false 48 enabled: false
49 } 49 }
50 } 50 }
@@ -52,15 +52,15 @@ describe('Test video editor API validator', function () {
52 52
53 await command.createEditionTasks({ 53 await command.createEditionTasks({
54 videoId: videoUUID, 54 videoId: videoUUID,
55 tasks: VideoEditorCommand.getComplexTask(), 55 tasks: VideoStudioCommand.getComplexTask(),
56 expectedStatus: HttpStatusCode.BAD_REQUEST_400 56 expectedStatus: HttpStatusCode.BAD_REQUEST_400
57 }) 57 })
58 }) 58 })
59 59
60 it('Should fail to enable editor if transcoding is disabled', async function () { 60 it('Should fail to enable studio if transcoding is disabled', async function () {
61 await server.config.updateExistingSubConfig({ 61 await server.config.updateExistingSubConfig({
62 newConfig: { 62 newConfig: {
63 videoEditor: { 63 videoStudio: {
64 enabled: true 64 enabled: true
65 }, 65 },
66 transcoding: { 66 transcoding: {
@@ -71,10 +71,10 @@ describe('Test video editor API validator', function () {
71 }) 71 })
72 }) 72 })
73 73
74 it('Should succeed to enable video editor', async function () { 74 it('Should succeed to enable video studio', async function () {
75 await server.config.updateExistingSubConfig({ 75 await server.config.updateExistingSubConfig({
76 newConfig: { 76 newConfig: {
77 videoEditor: { 77 videoStudio: {
78 enabled: true 78 enabled: true
79 }, 79 },
80 transcoding: { 80 transcoding: {
@@ -91,7 +91,7 @@ describe('Test video editor API validator', function () {
91 await command.createEditionTasks({ 91 await command.createEditionTasks({
92 token: null, 92 token: null,
93 videoId: videoUUID, 93 videoId: videoUUID,
94 tasks: VideoEditorCommand.getComplexTask(), 94 tasks: VideoStudioCommand.getComplexTask(),
95 expectedStatus: HttpStatusCode.UNAUTHORIZED_401 95 expectedStatus: HttpStatusCode.UNAUTHORIZED_401
96 }) 96 })
97 }) 97 })
@@ -100,7 +100,7 @@ describe('Test video editor API validator', function () {
100 await command.createEditionTasks({ 100 await command.createEditionTasks({
101 token: userAccessToken, 101 token: userAccessToken,
102 videoId: videoUUID, 102 videoId: videoUUID,
103 tasks: VideoEditorCommand.getComplexTask(), 103 tasks: VideoStudioCommand.getComplexTask(),
104 expectedStatus: HttpStatusCode.FORBIDDEN_403 104 expectedStatus: HttpStatusCode.FORBIDDEN_403
105 }) 105 })
106 }) 106 })
@@ -108,7 +108,7 @@ describe('Test video editor API validator', function () {
108 it('Should fail with an invalid video', async function () { 108 it('Should fail with an invalid video', async function () {
109 await command.createEditionTasks({ 109 await command.createEditionTasks({
110 videoId: 'tintin', 110 videoId: 'tintin',
111 tasks: VideoEditorCommand.getComplexTask(), 111 tasks: VideoStudioCommand.getComplexTask(),
112 expectedStatus: HttpStatusCode.BAD_REQUEST_400 112 expectedStatus: HttpStatusCode.BAD_REQUEST_400
113 }) 113 })
114 }) 114 })
@@ -116,7 +116,7 @@ describe('Test video editor API validator', function () {
116 it('Should fail with an unknown video', async function () { 116 it('Should fail with an unknown video', async function () {
117 await command.createEditionTasks({ 117 await command.createEditionTasks({
118 videoId: 42, 118 videoId: 42,
119 tasks: VideoEditorCommand.getComplexTask(), 119 tasks: VideoStudioCommand.getComplexTask(),
120 expectedStatus: HttpStatusCode.NOT_FOUND_404 120 expectedStatus: HttpStatusCode.NOT_FOUND_404
121 }) 121 })
122 }) 122 })
@@ -132,7 +132,7 @@ describe('Test video editor API validator', function () {
132 132
133 await command.createEditionTasks({ 133 await command.createEditionTasks({
134 videoId: uuid, 134 videoId: uuid,
135 tasks: VideoEditorCommand.getComplexTask(), 135 tasks: VideoStudioCommand.getComplexTask(),
136 expectedStatus: HttpStatusCode.CONFLICT_409 136 expectedStatus: HttpStatusCode.CONFLICT_409
137 }) 137 })
138 138
@@ -171,7 +171,7 @@ describe('Test video editor API validator', function () {
171 }) 171 })
172 172
173 it('Should fail with too many tasks', async function () { 173 it('Should fail with too many tasks', async function () {
174 const tasks: VideoEditorTask[] = [] 174 const tasks: VideoStudioTask[] = []
175 175
176 for (let i = 0; i < 110; i++) { 176 for (let i = 0; i < 110; i++) {
177 tasks.push({ 177 tasks.push({
@@ -194,7 +194,7 @@ describe('Test video editor API validator', function () {
194 194
195 await command.createEditionTasks({ 195 await command.createEditionTasks({
196 videoId: videoUUID, 196 videoId: videoUUID,
197 tasks: VideoEditorCommand.getComplexTask(), 197 tasks: VideoStudioCommand.getComplexTask(),
198 expectedStatus: HttpStatusCode.NO_CONTENT_204 198 expectedStatus: HttpStatusCode.NO_CONTENT_204
199 }) 199 })
200 }) 200 })
@@ -204,7 +204,7 @@ describe('Test video editor API validator', function () {
204 204
205 await command.createEditionTasks({ 205 await command.createEditionTasks({
206 videoId: videoUUID, 206 videoId: videoUUID,
207 tasks: VideoEditorCommand.getComplexTask(), 207 tasks: VideoStudioCommand.getComplexTask(),
208 expectedStatus: HttpStatusCode.CONFLICT_409 208 expectedStatus: HttpStatusCode.CONFLICT_409
209 }) 209 })
210 210
diff --git a/server/tests/api/notifications/user-notifications.ts b/server/tests/api/notifications/user-notifications.ts
index c87686cb5..47e85a30c 100644
--- a/server/tests/api/notifications/user-notifications.ts
+++ b/server/tests/api/notifications/user-notifications.ts
@@ -7,7 +7,7 @@ import {
7 checkMyVideoImportIsFinished, 7 checkMyVideoImportIsFinished,
8 checkNewActorFollow, 8 checkNewActorFollow,
9 checkNewVideoFromSubscription, 9 checkNewVideoFromSubscription,
10 checkVideoEditionIsFinished, 10 checkVideoStudioEditionIsFinished,
11 checkVideoIsPublished, 11 checkVideoIsPublished,
12 FIXTURE_URLS, 12 FIXTURE_URLS,
13 MockSmtpServer, 13 MockSmtpServer,
@@ -16,7 +16,7 @@ import {
16} from '@server/tests/shared' 16} from '@server/tests/shared'
17import { wait } from '@shared/core-utils' 17import { wait } from '@shared/core-utils'
18import { buildUUID } from '@shared/extra-utils' 18import { buildUUID } from '@shared/extra-utils'
19import { UserNotification, UserNotificationType, VideoEditorTask, VideoPrivacy } from '@shared/models' 19import { UserNotification, UserNotificationType, VideoStudioTask, VideoPrivacy } from '@shared/models'
20import { cleanupTests, PeerTubeServer, waitJobs } from '@shared/server-commands' 20import { cleanupTests, PeerTubeServer, waitJobs } from '@shared/server-commands'
21 21
22const expect = chai.expect 22const expect = chai.expect
@@ -323,7 +323,7 @@ describe('Test user notifications', function () {
323 }) 323 })
324 }) 324 })
325 325
326 describe('Video editor', function () { 326 describe('Video studio', function () {
327 let baseParams: CheckerBaseParams 327 let baseParams: CheckerBaseParams
328 328
329 before(() => { 329 before(() => {
@@ -335,7 +335,7 @@ describe('Test user notifications', function () {
335 } 335 }
336 }) 336 })
337 337
338 it('Should send a notification after editor edition', async function () { 338 it('Should send a notification after studio edition', async function () {
339 this.timeout(240000) 339 this.timeout(240000)
340 340
341 const { name, shortUUID, id } = await uploadRandomVideoOnServers(servers, 2, { waitTranscoding: true }) 341 const { name, shortUUID, id } = await uploadRandomVideoOnServers(servers, 2, { waitTranscoding: true })
@@ -343,7 +343,7 @@ describe('Test user notifications', function () {
343 await waitJobs(servers) 343 await waitJobs(servers)
344 await checkVideoIsPublished({ ...baseParams, videoName: name, shortUUID, checkType: 'presence' }) 344 await checkVideoIsPublished({ ...baseParams, videoName: name, shortUUID, checkType: 'presence' })
345 345
346 const tasks: VideoEditorTask[] = [ 346 const tasks: VideoStudioTask[] = [
347 { 347 {
348 name: 'cut', 348 name: 'cut',
349 options: { 349 options: {
@@ -352,10 +352,10 @@ describe('Test user notifications', function () {
352 } 352 }
353 } 353 }
354 ] 354 ]
355 await servers[1].videoEditor.createEditionTasks({ videoId: id, tasks }) 355 await servers[1].videoStudio.createEditionTasks({ videoId: id, tasks })
356 await waitJobs(servers) 356 await waitJobs(servers)
357 357
358 await checkVideoEditionIsFinished({ ...baseParams, videoName: name, shortUUID, checkType: 'presence' }) 358 await checkVideoStudioEditionIsFinished({ ...baseParams, videoName: name, shortUUID, checkType: 'presence' })
359 }) 359 })
360 }) 360 })
361 361
diff --git a/server/tests/api/server/config.ts b/server/tests/api/server/config.ts
index 5028b65e6..f31012a5c 100644
--- a/server/tests/api/server/config.ts
+++ b/server/tests/api/server/config.ts
@@ -98,7 +98,7 @@ function checkInitialConfig (server: PeerTubeServer, data: CustomConfig) {
98 expect(data.live.transcoding.resolutions['1440p']).to.be.false 98 expect(data.live.transcoding.resolutions['1440p']).to.be.false
99 expect(data.live.transcoding.resolutions['2160p']).to.be.false 99 expect(data.live.transcoding.resolutions['2160p']).to.be.false
100 100
101 expect(data.videoEditor.enabled).to.be.false 101 expect(data.videoStudio.enabled).to.be.false
102 102
103 expect(data.import.videos.concurrency).to.equal(2) 103 expect(data.import.videos.concurrency).to.equal(2)
104 expect(data.import.videos.http.enabled).to.be.true 104 expect(data.import.videos.http.enabled).to.be.true
@@ -201,7 +201,7 @@ function checkUpdatedConfig (data: CustomConfig) {
201 expect(data.live.transcoding.resolutions['1080p']).to.be.true 201 expect(data.live.transcoding.resolutions['1080p']).to.be.true
202 expect(data.live.transcoding.resolutions['2160p']).to.be.true 202 expect(data.live.transcoding.resolutions['2160p']).to.be.true
203 203
204 expect(data.videoEditor.enabled).to.be.true 204 expect(data.videoStudio.enabled).to.be.true
205 205
206 expect(data.import.videos.concurrency).to.equal(4) 206 expect(data.import.videos.concurrency).to.equal(4)
207 expect(data.import.videos.http.enabled).to.be.false 207 expect(data.import.videos.http.enabled).to.be.false
@@ -350,7 +350,7 @@ const newCustomConfig: CustomConfig = {
350 } 350 }
351 } 351 }
352 }, 352 },
353 videoEditor: { 353 videoStudio: {
354 enabled: true 354 enabled: true
355 }, 355 },
356 import: { 356 import: {
diff --git a/server/tests/api/transcoding/index.ts b/server/tests/api/transcoding/index.ts
index 8a0a1d787..0cc28b4a4 100644
--- a/server/tests/api/transcoding/index.ts
+++ b/server/tests/api/transcoding/index.ts
@@ -2,4 +2,4 @@ export * from './audio-only'
2export * from './create-transcoding' 2export * from './create-transcoding'
3export * from './hls' 3export * from './hls'
4export * from './transcoder' 4export * from './transcoder'
5export * from './video-editor' 5export * from './video-studio'
diff --git a/server/tests/api/transcoding/video-editor.ts b/server/tests/api/transcoding/video-studio.ts
index f70bd49e6..ac1c0fc7e 100644
--- a/server/tests/api/transcoding/video-editor.ts
+++ b/server/tests/api/transcoding/video-studio.ts
@@ -1,7 +1,7 @@
1import { expect } from 'chai' 1import { expect } from 'chai'
2import { expectStartWith, getAllFiles } from '@server/tests/shared' 2import { expectStartWith, getAllFiles } from '@server/tests/shared'
3import { areObjectStorageTestsDisabled } from '@shared/core-utils' 3import { areObjectStorageTestsDisabled } from '@shared/core-utils'
4import { VideoEditorTask } from '@shared/models' 4import { VideoStudioTask } from '@shared/models'
5import { 5import {
6 cleanupTests, 6 cleanupTests,
7 createMultipleServers, 7 createMultipleServers,
@@ -10,11 +10,11 @@ import {
10 PeerTubeServer, 10 PeerTubeServer,
11 setAccessTokensToServers, 11 setAccessTokensToServers,
12 setDefaultVideoChannel, 12 setDefaultVideoChannel,
13 VideoEditorCommand, 13 VideoStudioCommand,
14 waitJobs 14 waitJobs
15} from '@shared/server-commands' 15} from '@shared/server-commands'
16 16
17describe('Test video editor', function () { 17describe('Test video studio', function () {
18 let servers: PeerTubeServer[] = [] 18 let servers: PeerTubeServer[] = []
19 let videoUUID: string 19 let videoUUID: string
20 20
@@ -39,8 +39,8 @@ describe('Test video editor', function () {
39 await waitJobs(servers) 39 await waitJobs(servers)
40 } 40 }
41 41
42 async function createTasks (tasks: VideoEditorTask[]) { 42 async function createTasks (tasks: VideoStudioTask[]) {
43 await servers[0].videoEditor.createEditionTasks({ videoId: videoUUID, tasks }) 43 await servers[0].videoStudio.createEditionTasks({ videoId: videoUUID, tasks })
44 await waitJobs(servers) 44 await waitJobs(servers)
45 } 45 }
46 46
@@ -56,7 +56,7 @@ describe('Test video editor', function () {
56 56
57 await servers[0].config.enableMinimumTranscoding() 57 await servers[0].config.enableMinimumTranscoding()
58 58
59 await servers[0].config.enableEditor() 59 await servers[0].config.enableStudio()
60 }) 60 })
61 61
62 describe('Cutting', function () { 62 describe('Cutting', function () {
@@ -276,7 +276,7 @@ describe('Test video editor', function () {
276 this.timeout(240_000) 276 this.timeout(240_000)
277 await renewVideo() 277 await renewVideo()
278 278
279 await createTasks(VideoEditorCommand.getComplexTask()) 279 await createTasks(VideoStudioCommand.getComplexTask())
280 280
281 for (const server of servers) { 281 for (const server of servers) {
282 await checkDuration(server, 9) 282 await checkDuration(server, 9)
@@ -303,7 +303,7 @@ describe('Test video editor', function () {
303 this.timeout(240_000) 303 this.timeout(240_000)
304 await renewVideo() 304 await renewVideo()
305 305
306 await createTasks(VideoEditorCommand.getComplexTask()) 306 await createTasks(VideoStudioCommand.getComplexTask())
307 307
308 for (const server of servers) { 308 for (const server of servers) {
309 const video = await server.videos.get({ id: videoUUID }) 309 const video = await server.videos.get({ id: videoUUID })
@@ -333,7 +333,7 @@ describe('Test video editor', function () {
333 const video = await servers[0].videos.get({ id: videoUUID }) 333 const video = await servers[0].videos.get({ id: videoUUID })
334 const oldFileUrls = getAllFiles(video).map(f => f.fileUrl) 334 const oldFileUrls = getAllFiles(video).map(f => f.fileUrl)
335 335
336 await createTasks(VideoEditorCommand.getComplexTask()) 336 await createTasks(VideoStudioCommand.getComplexTask())
337 337
338 for (const server of servers) { 338 for (const server of servers) {
339 const video = await server.videos.get({ id: videoUUID }) 339 const video = await server.videos.get({ id: videoUUID })
diff --git a/server/tests/shared/notifications.ts b/server/tests/shared/notifications.ts
index f1ddbbbf7..2a69a09de 100644
--- a/server/tests/shared/notifications.ts
+++ b/server/tests/shared/notifications.ts
@@ -47,7 +47,7 @@ function getAllNotificationsSettings (): UserNotificationSetting {
47 abuseStateChange: UserNotificationSettingValue.WEB | UserNotificationSettingValue.EMAIL, 47 abuseStateChange: UserNotificationSettingValue.WEB | UserNotificationSettingValue.EMAIL,
48 autoInstanceFollowing: UserNotificationSettingValue.WEB | UserNotificationSettingValue.EMAIL, 48 autoInstanceFollowing: UserNotificationSettingValue.WEB | UserNotificationSettingValue.EMAIL,
49 newPeerTubeVersion: UserNotificationSettingValue.WEB | UserNotificationSettingValue.EMAIL, 49 newPeerTubeVersion: UserNotificationSettingValue.WEB | UserNotificationSettingValue.EMAIL,
50 myVideoEditionFinished: UserNotificationSettingValue.WEB | UserNotificationSettingValue.EMAIL, 50 myVideoStudioEditionFinished: UserNotificationSettingValue.WEB | UserNotificationSettingValue.EMAIL,
51 newPluginVersion: UserNotificationSettingValue.WEB | UserNotificationSettingValue.EMAIL 51 newPluginVersion: UserNotificationSettingValue.WEB | UserNotificationSettingValue.EMAIL
52 } 52 }
53} 53}
@@ -110,13 +110,13 @@ async function checkVideoIsPublished (options: CheckerBaseParams & {
110 await checkNotification({ ...options, notificationChecker, emailNotificationFinder }) 110 await checkNotification({ ...options, notificationChecker, emailNotificationFinder })
111} 111}
112 112
113async function checkVideoEditionIsFinished (options: CheckerBaseParams & { 113async function checkVideoStudioEditionIsFinished (options: CheckerBaseParams & {
114 videoName: string 114 videoName: string
115 shortUUID: string 115 shortUUID: string
116 checkType: CheckerType 116 checkType: CheckerType
117}) { 117}) {
118 const { videoName, shortUUID } = options 118 const { videoName, shortUUID } = options
119 const notificationType = UserNotificationType.MY_VIDEO_EDITION_FINISHED 119 const notificationType = UserNotificationType.MY_VIDEO_STUDIO_EDITION_FINISHED
120 120
121 function notificationChecker (notification: UserNotification, checkType: CheckerType) { 121 function notificationChecker (notification: UserNotification, checkType: CheckerType) {
122 if (checkType === 'presence') { 122 if (checkType === 'presence') {
@@ -685,7 +685,7 @@ async function prepareNotificationsTest (serversCount = 3, overrideConfigArg: an
685 await setDefaultChannelAvatar(servers) 685 await setDefaultChannelAvatar(servers)
686 await setDefaultAccountAvatar(servers) 686 await setDefaultAccountAvatar(servers)
687 687
688 await servers[1].config.enableEditor() 688 await servers[1].config.enableStudio()
689 689
690 if (serversCount > 1) { 690 if (serversCount > 1) {
691 await doubleFollow(servers[0], servers[1]) 691 await doubleFollow(servers[0], servers[1])
@@ -756,7 +756,7 @@ export {
756 checkNewAccountAbuseForModerators, 756 checkNewAccountAbuseForModerators,
757 checkNewPeerTubeVersion, 757 checkNewPeerTubeVersion,
758 checkNewPluginVersion, 758 checkNewPluginVersion,
759 checkVideoEditionIsFinished 759 checkVideoStudioEditionIsFinished
760} 760}
761 761
762// --------------------------------------------------------------------------- 762// ---------------------------------------------------------------------------