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:
parent
aa8b6df4a5
commit
14d3270f36
18 changed files with 266 additions and 230 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue