aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--server/models/video/video-format-utils.ts22
1 files changed, 6 insertions, 16 deletions
diff --git a/server/models/video/video-format-utils.ts b/server/models/video/video-format-utils.ts
index 8bc696055..89b0f5050 100644
--- a/server/models/video/video-format-utils.ts
+++ b/server/models/video/video-format-utils.ts
@@ -327,10 +327,7 @@ function videoModelToActivityPubObject (video: MVideoAP): VideoTorrentObject {
327 }) 327 })
328 } 328 }
329 329
330 // FIXME: remove and uncomment in PT 2.3 330 const icons = [ video.getMiniature(), video.getPreview() ]
331 // Breaks compatibility with PT <= 2.1
332 // const icons = [ video.getMiniature(), video.getPreview() ]
333 const miniature = video.getMiniature()
334 331
335 return { 332 return {
336 type: 'Video' as 'Video', 333 type: 'Video' as 'Video',
@@ -355,20 +352,13 @@ function videoModelToActivityPubObject (video: MVideoAP): VideoTorrentObject {
355 content: video.description, 352 content: video.description,
356 support: video.support, 353 support: video.support,
357 subtitleLanguage, 354 subtitleLanguage,
358 icon: { 355 icon: icons.map(i => ({
359 type: 'Image', 356 type: 'Image',
360 url: miniature.getFileUrl(video), 357 url: i.getFileUrl(video),
361 mediaType: 'image/jpeg', 358 mediaType: 'image/jpeg',
362 width: miniature.width, 359 width: i.width,
363 height: miniature.height 360 height: i.height
364 } as any, 361 })),
365 // icon: icons.map(i => ({
366 // type: 'Image',
367 // url: i.getFileUrl(video),
368 // mediaType: 'image/jpeg',
369 // width: i.width,
370 // height: i.height
371 // })),
372 url, 362 url,
373 likes: getVideoLikesActivityPubUrl(video), 363 likes: getVideoLikesActivityPubUrl(video),
374 dislikes: getVideoDislikesActivityPubUrl(video), 364 dislikes: getVideoDislikesActivityPubUrl(video),