aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-06-29 16:41:29 +0200
committerChocobozzz <me@florianbigard.com>2018-06-29 17:10:54 +0200
commit3a6f351b255d21ec42578632600ba699885f350e (patch)
treefdc770f5f59a87a929a5c85da9aed783e9676097 /server/helpers/custom-validators
parent34b19192901b0f872c72ce8d94a69aeba51d1c29 (diff)
downloadPeerTube-3a6f351b255d21ec42578632600ba699885f350e.tar.gz
PeerTube-3a6f351b255d21ec42578632600ba699885f350e.tar.zst
PeerTube-3a6f351b255d21ec42578632600ba699885f350e.zip
Handle higher FPS for high resolution (test)
Diffstat (limited to 'server/helpers/custom-validators')
-rw-r--r--server/helpers/custom-validators/videos.ts5
1 files changed, 5 insertions, 0 deletions
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) {
118 return exists(value) && validator.isInt(value + '') 118 return exists(value) && validator.isInt(value + '')
119} 119}
120 120
121function isVideoFPSResolutionValid (value: string) {
122 return value === null || validator.isInt(value + '')
123}
124
121function isVideoFileSizeValid (value: string) { 125function isVideoFileSizeValid (value: string) {
122 return exists(value) && validator.isInt(value + '', VIDEOS_CONSTRAINTS_FIELDS.FILE_SIZE) 126 return exists(value) && validator.isInt(value + '', VIDEOS_CONSTRAINTS_FIELDS.FILE_SIZE)
123} 127}
@@ -182,6 +186,7 @@ export {
182 isVideoFileInfoHashValid, 186 isVideoFileInfoHashValid,
183 isVideoNameValid, 187 isVideoNameValid,
184 isVideoTagsValid, 188 isVideoTagsValid,
189 isVideoFPSResolutionValid,
185 isScheduleVideoUpdatePrivacyValid, 190 isScheduleVideoUpdatePrivacyValid,
186 isVideoAbuseReasonValid, 191 isVideoAbuseReasonValid,
187 isVideoFile, 192 isVideoFile,