From 1808a1f8e4b7b102823492a2007a46929aebf189 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 22 Mar 2022 14:35:04 +0100 Subject: Add video edition finished notification --- server/controllers/api/users/my-notifications.ts | 3 ++- server/controllers/api/videos/upload.ts | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'server/controllers') diff --git a/server/controllers/api/users/my-notifications.ts b/server/controllers/api/users/my-notifications.ts index 58732158f..55184dc0f 100644 --- a/server/controllers/api/users/my-notifications.ts +++ b/server/controllers/api/users/my-notifications.ts @@ -82,7 +82,8 @@ async function updateNotificationSettings (req: express.Request, res: express.Re abuseNewMessage: body.abuseNewMessage, abuseStateChange: body.abuseStateChange, newPeerTubeVersion: body.newPeerTubeVersion, - newPluginVersion: body.newPluginVersion + newPluginVersion: body.newPluginVersion, + myVideoEditionFinished: body.myVideoEditionFinished } await UserNotificationSettingModel.update(values, query) diff --git a/server/controllers/api/videos/upload.ts b/server/controllers/api/videos/upload.ts index 14ae9d920..3afbedbb2 100644 --- a/server/controllers/api/videos/upload.ts +++ b/server/controllers/api/videos/upload.ts @@ -218,11 +218,11 @@ async function addVideo (options: { if (!refreshedVideo) return if (refreshedVideo.state === VideoState.TO_MOVE_TO_EXTERNAL_STORAGE) { - return addMoveToObjectStorageJob(refreshedVideo) + return addMoveToObjectStorageJob({ video: refreshedVideo, previousVideoState: undefined }) } if (refreshedVideo.state === VideoState.TO_TRANSCODE) { - return addOptimizeOrMergeAudioJob(refreshedVideo, videoFile, user) + return addOptimizeOrMergeAudioJob({ video: refreshedVideo, videoFile, user }) } }).catch(err => logger.error('Cannot add optimize/merge audio job for %s.', videoCreated.uuid, { err, ...lTags(videoCreated.uuid) })) -- cgit v1.2.3