mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-06 03:50:26 +02:00
Add video privacy setting
This commit is contained in:
parent
b7a485121d
commit
fd45e8f43c
48 changed files with 545 additions and 208 deletions
|
@ -11,6 +11,7 @@ import {
|
|||
VIDEO_LICENCES,
|
||||
VIDEO_LANGUAGES,
|
||||
VIDEO_RATE_TYPES,
|
||||
VIDEO_PRIVACIES,
|
||||
database as db
|
||||
} from '../../initializers'
|
||||
import { isUserUsernameValid } from './users'
|
||||
|
@ -36,6 +37,15 @@ function isVideoLicenceValid (value: number) {
|
|||
return VIDEO_LICENCES[value] !== undefined
|
||||
}
|
||||
|
||||
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)
|
||||
|
@ -195,6 +205,8 @@ export {
|
|||
isVideoDislikesValid,
|
||||
isVideoEventCountValid,
|
||||
isVideoFileSizeValid,
|
||||
isVideoPrivacyValid,
|
||||
isRemoteVideoPrivacyValid,
|
||||
isVideoFileResolutionValid,
|
||||
checkVideoExists,
|
||||
isRemoteVideoCategoryValid,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue