diff options
Diffstat (limited to 'server/lib/video.ts')
-rw-r--r-- | server/lib/video.ts | 7 |
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 | |||
9 | import { ThumbnailType, VideoCreate, VideoPrivacy, VideoTranscodingPayload } from '@shared/models' | 9 | import { ThumbnailType, VideoCreate, VideoPrivacy, VideoTranscodingPayload } from '@shared/models' |
10 | import { CreateJobOptions, JobQueue } from './job-queue/job-queue' | 10 | import { CreateJobOptions, JobQueue } from './job-queue/job-queue' |
11 | import { updateVideoMiniatureFromExisting } from './thumbnail' | 11 | import { updateVideoMiniatureFromExisting } from './thumbnail' |
12 | import { CONFIG } from '@server/initializers/config' | ||
12 | 13 | ||
13 | function buildLocalVideoFromReq (videoInfo: VideoCreate, channelId: number): FilteredModelAttributes<VideoModel> { | 14 | function 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, |