aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models
diff options
context:
space:
mode:
Diffstat (limited to 'server/models')
-rw-r--r--server/models/video/video-format-utils.ts22
1 files changed, 16 insertions, 6 deletions
diff --git a/server/models/video/video-format-utils.ts b/server/models/video/video-format-utils.ts
index 0d3c5a8ac..d71a3a5db 100644
--- a/server/models/video/video-format-utils.ts
+++ b/server/models/video/video-format-utils.ts
@@ -323,7 +323,10 @@ function videoModelToActivityPubObject (video: MVideoAP): VideoTorrentObject {
323 }) 323 })
324 } 324 }
325 325
326 const icons = [ video.getMiniature(), video.getPreview() ] 326 // FIXME: remove and uncomment in PT 2.3
327 // Breaks compatibility with PT <= 2.1
328 // const icons = [ video.getMiniature(), video.getPreview() ]
329 const miniature = video.getMiniature()
327 330
328 return { 331 return {
329 type: 'Video' as 'Video', 332 type: 'Video' as 'Video',
@@ -348,13 +351,20 @@ function videoModelToActivityPubObject (video: MVideoAP): VideoTorrentObject {
348 content: video.getTruncatedDescription(), 351 content: video.getTruncatedDescription(),
349 support: video.support, 352 support: video.support,
350 subtitleLanguage, 353 subtitleLanguage,
351 icon: icons.map(i => ({ 354 icon: {
352 type: 'Image', 355 type: 'Image',
353 url: i.getFileUrl(video), 356 url: miniature.getFileUrl(video),
354 mediaType: 'image/jpeg', 357 mediaType: 'image/jpeg',
355 width: i.width, 358 width: miniature.width,
356 height: i.height 359 height: miniature.height
357 })), 360 } as any,
361 // icon: icons.map(i => ({
362 // type: 'Image',
363 // url: i.getFileUrl(video),
364 // mediaType: 'image/jpeg',
365 // width: i.width,
366 // height: i.height
367 // })),
358 url, 368 url,
359 likes: getVideoLikesActivityPubUrl(video), 369 likes: getVideoLikesActivityPubUrl(video),
360 dislikes: getVideoDislikesActivityPubUrl(video), 370 dislikes: getVideoDislikesActivityPubUrl(video),