-function isVideoPrivacyValid (value: string) {
- return VIDEO_PRIVACIES[value] !== undefined
-}
-
-// Maybe we don't know the remote privacy setting, but that doesn't matter
-function isRemoteVideoPrivacyValid (value: string) {
- return validator.isInt('' + value)
-}
-
-// Maybe we don't know the remote licence, but that doesn't matter
-function isRemoteVideoLicenceValid (value: string) {
- return validator.isInt('' + value)
-}
-
-function isVideoLanguageValid (value: number) {
- return value === null || VIDEO_LANGUAGES[value] !== undefined
-}
-
-// Maybe we don't know the remote language, but that doesn't matter
-function isRemoteVideoLanguageValid (value: string) {
- return validator.isInt('' + value)
-}
-
-function isVideoNSFWValid (value: any) {
- return typeof value === 'boolean' || (typeof value === 'string' && validator.isBoolean(value))
+function isVideoLanguageValid (value: any) {
+ return value === null ||
+ (typeof value === 'string' && validator.isLength(value, VIDEOS_CONSTRAINTS_FIELDS.LANGUAGE))