X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fhelpers%2Fcustom-validators%2Fvideo-studio.ts;h=68dfec8dd03b44282f354bb5a8b09922cd58d951;hb=4638cd713dcdd007cd7f49b9a95fa62ac7823e7c;hp=19e7906d51c9a7f380cc6be3d3299afdeb1bf0fd;hpb=6bcb559fc9a491fc3ce83e7c077ee9dc742b1d63;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/helpers/custom-validators/video-studio.ts b/server/helpers/custom-validators/video-studio.ts index 19e7906d5..68dfec8dd 100644 --- a/server/helpers/custom-validators/video-studio.ts +++ b/server/helpers/custom-validators/video-studio.ts @@ -4,6 +4,7 @@ import { buildTaskFileFieldname } from '@server/lib/video-studio' import { VideoStudioTask } from '@shared/models' import { isArray } from './misc' import { isVideoFileMimeTypeValid, isVideoImageValid } from './videos' +import { forceNumber } from '@shared/core-utils' function isValidStudioTasksArray (tasks: any) { if (!isArray(tasks)) return false @@ -24,7 +25,7 @@ function isStudioCutTaskValid (task: VideoStudioTask) { if (!start || !end) return true - return parseInt(start + '') < parseInt(end + '') + return forceNumber(start) < forceNumber(end) } function isStudioTaskAddIntroOutroValid (task: VideoStudioTask, indice: number, files: Express.Multer.File[]) {