diff options
Diffstat (limited to 'server/models/video/video-format-utils.ts')
-rw-r--r-- | server/models/video/video-format-utils.ts | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/server/models/video/video-format-utils.ts b/server/models/video/video-format-utils.ts index 89992a5a8..877fcbc57 100644 --- a/server/models/video/video-format-utils.ts +++ b/server/models/video/video-format-utils.ts | |||
@@ -59,7 +59,7 @@ function videoModelToFormattedJSON (video: VideoModel, options?: VideoFormatting | |||
59 | views: video.views, | 59 | views: video.views, |
60 | likes: video.likes, | 60 | likes: video.likes, |
61 | dislikes: video.dislikes, | 61 | dislikes: video.dislikes, |
62 | thumbnailPath: video.getThumbnailStaticPath(), | 62 | thumbnailPath: video.getMiniatureStaticPath(), |
63 | previewPath: video.getPreviewStaticPath(), | 63 | previewPath: video.getPreviewStaticPath(), |
64 | embedPath: video.getEmbedStaticPath(), | 64 | embedPath: video.getEmbedStaticPath(), |
65 | createdAt: video.createdAt, | 65 | createdAt: video.createdAt, |
@@ -301,6 +301,8 @@ function videoModelToActivityPubObject (video: VideoModel): VideoTorrentObject { | |||
301 | }) | 301 | }) |
302 | } | 302 | } |
303 | 303 | ||
304 | const miniature = video.getMiniature() | ||
305 | |||
304 | return { | 306 | return { |
305 | type: 'Video' as 'Video', | 307 | type: 'Video' as 'Video', |
306 | id: video.url, | 308 | id: video.url, |
@@ -326,10 +328,10 @@ function videoModelToActivityPubObject (video: VideoModel): VideoTorrentObject { | |||
326 | subtitleLanguage, | 328 | subtitleLanguage, |
327 | icon: { | 329 | icon: { |
328 | type: 'Image', | 330 | type: 'Image', |
329 | url: video.getThumbnail().getUrl(), | 331 | url: miniature.getUrl(), |
330 | mediaType: 'image/jpeg', | 332 | mediaType: 'image/jpeg', |
331 | width: video.getThumbnail().width, | 333 | width: miniature.width, |
332 | height: video.getThumbnail().height | 334 | height: miniature.height |
333 | }, | 335 | }, |
334 | url, | 336 | url, |
335 | likes: getVideoLikesActivityPubUrl(video), | 337 | likes: getVideoLikesActivityPubUrl(video), |