aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/video.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/video.ts')
-rw-r--r--server/lib/video.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/server/lib/video.ts b/server/lib/video.ts
index 1cfe4f27c..e5af028ea 100644
--- a/server/lib/video.ts
+++ b/server/lib/video.ts
@@ -9,16 +9,17 @@ import { MThumbnail, MUserId, MVideoFile, MVideoTag, MVideoThumbnail, MVideoUUID
9import { ThumbnailType, VideoCreate, VideoPrivacy, VideoTranscodingPayload } from '@shared/models' 9import { ThumbnailType, VideoCreate, VideoPrivacy, VideoTranscodingPayload } from '@shared/models'
10import { CreateJobOptions, JobQueue } from './job-queue/job-queue' 10import { CreateJobOptions, JobQueue } from './job-queue/job-queue'
11import { updateVideoMiniatureFromExisting } from './thumbnail' 11import { updateVideoMiniatureFromExisting } from './thumbnail'
12import { CONFIG } from '@server/initializers/config'
12 13
13function buildLocalVideoFromReq (videoInfo: VideoCreate, channelId: number): FilteredModelAttributes<VideoModel> { 14function buildLocalVideoFromReq (videoInfo: VideoCreate, channelId: number): FilteredModelAttributes<VideoModel> {
14 return { 15 return {
15 name: videoInfo.name, 16 name: videoInfo.name,
16 remote: false, 17 remote: false,
17 category: videoInfo.category, 18 category: videoInfo.category,
18 licence: videoInfo.licence, 19 licence: videoInfo.licence ?? CONFIG.DEFAULTS.PUBLISH.LICENCE,
19 language: videoInfo.language, 20 language: videoInfo.language,
20 commentsEnabled: videoInfo.commentsEnabled !== false, // If the value is not "false", the default is "true" 21 commentsEnabled: videoInfo.commentsEnabled ?? CONFIG.DEFAULTS.PUBLISH.COMMENTS_ENABLED,
21 downloadEnabled: videoInfo.downloadEnabled !== false, 22 downloadEnabled: videoInfo.downloadEnabled ?? CONFIG.DEFAULTS.PUBLISH.DOWNLOAD_ENABLED,
22 waitTranscoding: videoInfo.waitTranscoding || false, 23 waitTranscoding: videoInfo.waitTranscoding || false,
23 nsfw: videoInfo.nsfw || false, 24 nsfw: videoInfo.nsfw || false,
24 description: videoInfo.description, 25 description: videoInfo.description,