aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators/runners/jobs.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers/custom-validators/runners/jobs.ts')
-rw-r--r--server/helpers/custom-validators/runners/jobs.ts16
1 files changed, 8 insertions, 8 deletions
diff --git a/server/helpers/custom-validators/runners/jobs.ts b/server/helpers/custom-validators/runners/jobs.ts
index 934bd37c9..725a7658f 100644
--- a/server/helpers/custom-validators/runners/jobs.ts
+++ b/server/helpers/custom-validators/runners/jobs.ts
@@ -6,7 +6,7 @@ import {
6 RunnerJobSuccessPayload, 6 RunnerJobSuccessPayload,
7 RunnerJobType, 7 RunnerJobType,
8 RunnerJobUpdatePayload, 8 RunnerJobUpdatePayload,
9 VideoEditionTranscodingSuccess, 9 VideoStudioTranscodingSuccess,
10 VODAudioMergeTranscodingSuccess, 10 VODAudioMergeTranscodingSuccess,
11 VODHLSTranscodingSuccess, 11 VODHLSTranscodingSuccess,
12 VODWebVideoTranscodingSuccess 12 VODWebVideoTranscodingSuccess
@@ -25,7 +25,7 @@ function isRunnerJobSuccessPayloadValid (value: RunnerJobSuccessPayload, type: R
25 isRunnerJobVODHLSResultPayloadValid(value as VODHLSTranscodingSuccess, type, files) || 25 isRunnerJobVODHLSResultPayloadValid(value as VODHLSTranscodingSuccess, type, files) ||
26 isRunnerJobVODAudioMergeResultPayloadValid(value as VODHLSTranscodingSuccess, type, files) || 26 isRunnerJobVODAudioMergeResultPayloadValid(value as VODHLSTranscodingSuccess, type, files) ||
27 isRunnerJobLiveRTMPHLSResultPayloadValid(value as LiveRTMPHLSTranscodingSuccess, type) || 27 isRunnerJobLiveRTMPHLSResultPayloadValid(value as LiveRTMPHLSTranscodingSuccess, type) ||
28 isRunnerJobVideoEditionResultPayloadValid(value as VideoEditionTranscodingSuccess, type, files) 28 isRunnerJobVideoStudioResultPayloadValid(value as VideoStudioTranscodingSuccess, type, files)
29} 29}
30 30
31// --------------------------------------------------------------------------- 31// ---------------------------------------------------------------------------
@@ -37,7 +37,7 @@ function isRunnerJobProgressValid (value: string) {
37function isRunnerJobUpdatePayloadValid (value: RunnerJobUpdatePayload, type: RunnerJobType, files: UploadFilesForCheck) { 37function isRunnerJobUpdatePayloadValid (value: RunnerJobUpdatePayload, type: RunnerJobType, files: UploadFilesForCheck) {
38 return isRunnerJobVODWebVideoUpdatePayloadValid(value, type, files) || 38 return isRunnerJobVODWebVideoUpdatePayloadValid(value, type, files) ||
39 isRunnerJobVODHLSUpdatePayloadValid(value, type, files) || 39 isRunnerJobVODHLSUpdatePayloadValid(value, type, files) ||
40 isRunnerJobVideoEditionUpdatePayloadValid(value, type, files) || 40 isRunnerJobVideoStudioUpdatePayloadValid(value, type, files) ||
41 isRunnerJobVODAudioMergeUpdatePayloadValid(value, type, files) || 41 isRunnerJobVODAudioMergeUpdatePayloadValid(value, type, files) ||
42 isRunnerJobLiveRTMPHLSUpdatePayloadValid(value, type, files) 42 isRunnerJobLiveRTMPHLSUpdatePayloadValid(value, type, files)
43} 43}
@@ -105,12 +105,12 @@ function isRunnerJobLiveRTMPHLSResultPayloadValid (
105 return type === 'live-rtmp-hls-transcoding' && (!value || (typeof value === 'object' && Object.keys(value).length === 0)) 105 return type === 'live-rtmp-hls-transcoding' && (!value || (typeof value === 'object' && Object.keys(value).length === 0))
106} 106}
107 107
108function isRunnerJobVideoEditionResultPayloadValid ( 108function isRunnerJobVideoStudioResultPayloadValid (
109 _value: VideoEditionTranscodingSuccess, 109 _value: VideoStudioTranscodingSuccess,
110 type: RunnerJobType, 110 type: RunnerJobType,
111 files: UploadFilesForCheck 111 files: UploadFilesForCheck
112) { 112) {
113 return type === 'video-edition-transcoding' && 113 return type === 'video-studio-transcoding' &&
114 isFileValid({ files, field: 'payload[videoFile]', mimeTypeRegex: null, maxSize: null }) 114 isFileValid({ files, field: 'payload[videoFile]', mimeTypeRegex: null, maxSize: null })
115} 115}
116 116
@@ -177,11 +177,11 @@ function isRunnerJobLiveRTMPHLSUpdatePayloadValid (
177 ) 177 )
178} 178}
179 179
180function isRunnerJobVideoEditionUpdatePayloadValid ( 180function isRunnerJobVideoStudioUpdatePayloadValid (
181 value: RunnerJobUpdatePayload, 181 value: RunnerJobUpdatePayload,
182 type: RunnerJobType, 182 type: RunnerJobType,
183 _files: UploadFilesForCheck 183 _files: UploadFilesForCheck
184) { 184) {
185 return type === 'video-edition-transcoding' && 185 return type === 'video-studio-transcoding' &&
186 (!value || (typeof value === 'object' && Object.keys(value).length === 0)) 186 (!value || (typeof value === 'object' && Object.keys(value).length === 0))
187} 187}