From 3a6f351b255d21ec42578632600ba699885f350e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 29 Jun 2018 16:41:29 +0200 Subject: Handle higher FPS for high resolution (test) --- server/helpers/custom-validators/videos.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'server/helpers/custom-validators/videos.ts') diff --git a/server/helpers/custom-validators/videos.ts b/server/helpers/custom-validators/videos.ts index ae392f8c2..672f06dc0 100644 --- a/server/helpers/custom-validators/videos.ts +++ b/server/helpers/custom-validators/videos.ts @@ -118,6 +118,10 @@ function isVideoFileResolutionValid (value: string) { return exists(value) && validator.isInt(value + '') } +function isVideoFPSResolutionValid (value: string) { + return value === null || validator.isInt(value + '') +} + function isVideoFileSizeValid (value: string) { return exists(value) && validator.isInt(value + '', VIDEOS_CONSTRAINTS_FIELDS.FILE_SIZE) } @@ -182,6 +186,7 @@ export { isVideoFileInfoHashValid, isVideoNameValid, isVideoTagsValid, + isVideoFPSResolutionValid, isScheduleVideoUpdatePrivacyValid, isVideoAbuseReasonValid, isVideoFile, -- cgit v1.2.3