aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video-format-utils.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-09-28 10:18:37 +0200
committerChocobozzz <me@florianbigard.com>2018-09-28 10:18:37 +0200
commitc39e86b898370a55c147ed1958db00723b0364e4 (patch)
tree4a3e1dcdc7a061d9d86fd27bd76492a783b4172b /server/models/video/video-format-utils.ts
parent161b061d4e51eb1e2b2b7e9482d5299489ef7c45 (diff)
downloadPeerTube-c39e86b898370a55c147ed1958db00723b0364e4.tar.gz
PeerTube-c39e86b898370a55c147ed1958db00723b0364e4.tar.zst
PeerTube-c39e86b898370a55c147ed1958db00723b0364e4.zip
Fix video description when importing by url
Diffstat (limited to 'server/models/video/video-format-utils.ts')
-rw-r--r--server/models/video/video-format-utils.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/models/video/video-format-utils.ts b/server/models/video/video-format-utils.ts
index a9a58624d..18364a287 100644
--- a/server/models/video/video-format-utils.ts
+++ b/server/models/video/video-format-utils.ts
@@ -12,6 +12,7 @@ import {
12} from '../../lib/activitypub' 12} from '../../lib/activitypub'
13 13
14export type VideoFormattingJSONOptions = { 14export type VideoFormattingJSONOptions = {
15 completeDescription?: boolean
15 additionalAttributes: { 16 additionalAttributes: {
16 state?: boolean, 17 state?: boolean,
17 waitTranscoding?: boolean, 18 waitTranscoding?: boolean,
@@ -44,7 +45,7 @@ function videoModelToFormattedJSON (video: VideoModel, options?: VideoFormatting
44 label: VideoModel.getPrivacyLabel(video.privacy) 45 label: VideoModel.getPrivacyLabel(video.privacy)
45 }, 46 },
46 nsfw: video.nsfw, 47 nsfw: video.nsfw,
47 description: video.getTruncatedDescription(), 48 description: options.completeDescription === true ? video.description : video.getTruncatedDescription(),
48 isLocal: video.isOwned(), 49 isLocal: video.isOwned(),
49 duration: video.duration, 50 duration: video.duration,
50 views: video.views, 51 views: video.views,