aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/video.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/video.ts')
-rw-r--r--server/lib/video.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/lib/video.ts b/server/lib/video.ts
index f7d7aa186..6c4f3ce7b 100644
--- a/server/lib/video.ts
+++ b/server/lib/video.ts
@@ -9,7 +9,7 @@ import { VideoJobInfoModel } from '@server/models/video/video-job-info'
9import { FilteredModelAttributes } from '@server/types' 9import { FilteredModelAttributes } from '@server/types'
10import { MThumbnail, MUserId, MVideoFile, MVideoTag, MVideoThumbnail, MVideoUUID } from '@server/types/models' 10import { MThumbnail, MUserId, MVideoFile, MVideoTag, MVideoThumbnail, MVideoUUID } from '@server/types/models'
11import { ThumbnailType, VideoCreate, VideoPrivacy, VideoState, VideoTranscodingPayload } from '@shared/models' 11import { ThumbnailType, VideoCreate, VideoPrivacy, VideoState, VideoTranscodingPayload } from '@shared/models'
12import { CreateJobOptions, JobQueue } from './job-queue/job-queue' 12import { CreateJobOptions } from './job-queue/job-queue'
13import { updateVideoMiniatureFromExisting } from './thumbnail' 13import { updateVideoMiniatureFromExisting } from './thumbnail'
14 14
15function buildLocalVideoFromReq (videoInfo: VideoCreate, channelId: number): FilteredModelAttributes<VideoModel> { 15function buildLocalVideoFromReq (videoInfo: VideoCreate, channelId: number): FilteredModelAttributes<VideoModel> {
@@ -121,10 +121,10 @@ async function buildOptimizeOrMergeAudioJob (options: {
121 } 121 }
122} 122}
123 123
124async function addTranscodingJob (payload: VideoTranscodingPayload, options: CreateJobOptions = {}) { 124async function buildTranscodingJob (payload: VideoTranscodingPayload, options: CreateJobOptions = {}) {
125 await VideoJobInfoModel.increaseOrCreate(payload.videoUUID, 'pendingTranscode') 125 await VideoJobInfoModel.increaseOrCreate(payload.videoUUID, 'pendingTranscode')
126 126
127 return JobQueue.Instance.createJob({ type: 'video-transcoding', payload, ...options }) 127 return { type: 'video-transcoding' as 'video-transcoding', payload, ...options }
128} 128}
129 129
130async function getTranscodingJobPriority (user: MUserId) { 130async function getTranscodingJobPriority (user: MUserId) {
@@ -182,7 +182,7 @@ export {
182 buildVideoThumbnailsFromReq, 182 buildVideoThumbnailsFromReq,
183 setVideoTags, 183 setVideoTags,
184 buildOptimizeOrMergeAudioJob, 184 buildOptimizeOrMergeAudioJob,
185 addTranscodingJob, 185 buildTranscodingJob,
186 buildMoveToObjectStorageJob, 186 buildMoveToObjectStorageJob,
187 getTranscodingJobPriority, 187 getTranscodingJobPriority,
188 getCachedVideoDuration 188 getCachedVideoDuration