aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video-format-utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video/video-format-utils.ts')
-rw-r--r--server/models/video/video-format-utils.ts15
1 files changed, 8 insertions, 7 deletions
diff --git a/server/models/video/video-format-utils.ts b/server/models/video/video-format-utils.ts
index 2aa5b8677..bb50edcaa 100644
--- a/server/models/video/video-format-utils.ts
+++ b/server/models/video/video-format-utils.ts
@@ -307,11 +307,12 @@ function videoModelToActivityPubObject (video: MVideoAP): VideoTorrentObject {
307 for (const caption of video.VideoCaptions) { 307 for (const caption of video.VideoCaptions) {
308 subtitleLanguage.push({ 308 subtitleLanguage.push({
309 identifier: caption.language, 309 identifier: caption.language,
310 name: VideoCaptionModel.getLanguageLabel(caption.language) 310 name: VideoCaptionModel.getLanguageLabel(caption.language),
311 url: caption.getFileUrl(video)
311 }) 312 })
312 } 313 }
313 314
314 const miniature = video.getMiniature() 315 const icons = [ video.getMiniature(), video.getPreview() ]
315 316
316 return { 317 return {
317 type: 'Video' as 'Video', 318 type: 'Video' as 'Video',
@@ -336,13 +337,13 @@ function videoModelToActivityPubObject (video: MVideoAP): VideoTorrentObject {
336 content: video.getTruncatedDescription(), 337 content: video.getTruncatedDescription(),
337 support: video.support, 338 support: video.support,
338 subtitleLanguage, 339 subtitleLanguage,
339 icon: { 340 icon: icons.map(i => ({
340 type: 'Image', 341 type: 'Image',
341 url: miniature.getFileUrl(video.isOwned()), 342 url: i.getFileUrl(video),
342 mediaType: 'image/jpeg', 343 mediaType: 'image/jpeg',
343 width: miniature.width, 344 width: i.width,
344 height: miniature.height 345 height: i.height
345 }, 346 })),
346 url, 347 url,
347 likes: getVideoLikesActivityPubUrl(video), 348 likes: getVideoLikesActivityPubUrl(video),
348 dislikes: getVideoDislikesActivityPubUrl(video), 349 dislikes: getVideoDislikesActivityPubUrl(video),