aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers')
-rw-r--r--server/controllers/api/videos/transcoding.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/controllers/api/videos/transcoding.ts b/server/controllers/api/videos/transcoding.ts
index 54f484b2b..c0b93742f 100644
--- a/server/controllers/api/videos/transcoding.ts
+++ b/server/controllers/api/videos/transcoding.ts
@@ -3,6 +3,7 @@ import { logger, loggerTagsFactory } from '@server/helpers/logger'
3import { Hooks } from '@server/lib/plugins/hooks' 3import { Hooks } from '@server/lib/plugins/hooks'
4import { createTranscodingJobs } from '@server/lib/transcoding/create-transcoding-job' 4import { createTranscodingJobs } from '@server/lib/transcoding/create-transcoding-job'
5import { computeResolutionsToTranscode } from '@server/lib/transcoding/transcoding-resolutions' 5import { computeResolutionsToTranscode } from '@server/lib/transcoding/transcoding-resolutions'
6import { VideoJobInfoModel } from '@server/models/video/video-job-info'
6import { HttpStatusCode, UserRight, VideoState, VideoTranscodingCreate } from '@shared/models' 7import { HttpStatusCode, UserRight, VideoState, VideoTranscodingCreate } from '@shared/models'
7import { asyncMiddleware, authenticate, createTranscodingValidator, ensureUserHasRight } from '../../../middlewares' 8import { asyncMiddleware, authenticate, createTranscodingValidator, ensureUserHasRight } from '../../../middlewares'
8 9
@@ -30,6 +31,8 @@ async function createTranscoding (req: express.Request, res: express.Response) {
30 31
31 const body: VideoTranscodingCreate = req.body 32 const body: VideoTranscodingCreate = req.body
32 33
34 await VideoJobInfoModel.abortAllTasks(video.uuid, 'pendingTranscode')
35
33 const { resolution: maxResolution, hasAudio } = await video.probeMaxQualityFile() 36 const { resolution: maxResolution, hasAudio } = await video.probeMaxQualityFile()
34 37
35 const resolutions = await Hooks.wrapObject( 38 const resolutions = await Hooks.wrapObject(