1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Change how we handle resolution

It was an enum before, now we just use video height
This commit is contained in:
Chocobozzz 2017-10-09 11:06:13 +02:00
parent aa8b6df4a5
commit 14d3270f36
No known key found for this signature in database
GPG key ID: 583A612D890159BE
18 changed files with 266 additions and 230 deletions

View file

@ -8,8 +8,7 @@ import {
VIDEO_CATEGORIES,
VIDEO_LICENCES,
VIDEO_LANGUAGES,
VIDEO_RATE_TYPES,
VIDEO_FILE_RESOLUTIONS
VIDEO_RATE_TYPES
} from '../../initializers'
import { isUserUsernameValid } from './users'
import { isArray, exists } from './misc'
@ -128,7 +127,7 @@ function isVideoFileSizeValid (value: string) {
}
function isVideoFileResolutionValid (value: string) {
return VIDEO_FILE_RESOLUTIONS[value] !== undefined
return exists(value) && validator.isInt(value + '')
}
function isVideoFileExtnameValid (value: string) {