diff options
Diffstat (limited to 'server/lib/activitypub')
-rw-r--r-- | server/lib/activitypub/playlists/create-update.ts | 4 | ||||
-rw-r--r-- | server/lib/activitypub/videos/shared/abstract-builder.ts | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/server/lib/activitypub/playlists/create-update.ts b/server/lib/activitypub/playlists/create-update.ts index fcfcc41a2..dd4316d54 100644 --- a/server/lib/activitypub/playlists/create-update.ts +++ b/server/lib/activitypub/playlists/create-update.ts | |||
@@ -2,7 +2,7 @@ import { isArray } from '@server/helpers/custom-validators/misc' | |||
2 | import { logger, loggerTagsFactory } from '@server/helpers/logger' | 2 | import { logger, loggerTagsFactory } from '@server/helpers/logger' |
3 | import { CRAWL_REQUEST_CONCURRENCY } from '@server/initializers/constants' | 3 | import { CRAWL_REQUEST_CONCURRENCY } from '@server/initializers/constants' |
4 | import { sequelizeTypescript } from '@server/initializers/database' | 4 | import { sequelizeTypescript } from '@server/initializers/database' |
5 | import { createPlaylistMiniatureFromUrl } from '@server/lib/thumbnail' | 5 | import { updatePlaylistMiniatureFromUrl } from '@server/lib/thumbnail' |
6 | import { VideoPlaylistModel } from '@server/models/video/video-playlist' | 6 | import { VideoPlaylistModel } from '@server/models/video/video-playlist' |
7 | import { VideoPlaylistElementModel } from '@server/models/video/video-playlist-element' | 7 | import { VideoPlaylistElementModel } from '@server/models/video/video-playlist-element' |
8 | import { FilteredModelAttributes } from '@server/types' | 8 | import { FilteredModelAttributes } from '@server/types' |
@@ -98,7 +98,7 @@ async function fetchElementUrls (playlistObject: PlaylistObject) { | |||
98 | 98 | ||
99 | async function updatePlaylistThumbnail (playlistObject: PlaylistObject, playlist: MVideoPlaylistFull) { | 99 | async function updatePlaylistThumbnail (playlistObject: PlaylistObject, playlist: MVideoPlaylistFull) { |
100 | if (playlistObject.icon) { | 100 | if (playlistObject.icon) { |
101 | const thumbnailModel = await createPlaylistMiniatureFromUrl({ downloadUrl: playlistObject.icon.url, playlist }) | 101 | const thumbnailModel = await updatePlaylistMiniatureFromUrl({ downloadUrl: playlistObject.icon.url, playlist }) |
102 | await playlist.setAndSaveThumbnail(thumbnailModel, undefined) | 102 | await playlist.setAndSaveThumbnail(thumbnailModel, undefined) |
103 | 103 | ||
104 | return | 104 | return |
diff --git a/server/lib/activitypub/videos/shared/abstract-builder.ts b/server/lib/activitypub/videos/shared/abstract-builder.ts index 4bd38b40c..0b58ddb33 100644 --- a/server/lib/activitypub/videos/shared/abstract-builder.ts +++ b/server/lib/activitypub/videos/shared/abstract-builder.ts | |||
@@ -2,7 +2,7 @@ import { Transaction } from 'sequelize/types' | |||
2 | import { checkUrlsSameHost } from '@server/helpers/activitypub' | 2 | import { checkUrlsSameHost } from '@server/helpers/activitypub' |
3 | import { deleteNonExistingModels } from '@server/helpers/database-utils' | 3 | import { deleteNonExistingModels } from '@server/helpers/database-utils' |
4 | import { logger, LoggerTagsFn } from '@server/helpers/logger' | 4 | import { logger, LoggerTagsFn } from '@server/helpers/logger' |
5 | import { createPlaceholderThumbnail, createVideoMiniatureFromUrl } from '@server/lib/thumbnail' | 5 | import { updatePlaceholderThumbnail, updateVideoMiniatureFromUrl } from '@server/lib/thumbnail' |
6 | import { setVideoTags } from '@server/lib/video' | 6 | import { setVideoTags } from '@server/lib/video' |
7 | import { VideoCaptionModel } from '@server/models/video/video-caption' | 7 | import { VideoCaptionModel } from '@server/models/video/video-caption' |
8 | import { VideoFileModel } from '@server/models/video/video-file' | 8 | import { VideoFileModel } from '@server/models/video/video-file' |
@@ -38,7 +38,7 @@ export abstract class APVideoAbstractBuilder { | |||
38 | } | 38 | } |
39 | 39 | ||
40 | protected tryToGenerateThumbnail (video: MVideoThumbnail): Promise<MThumbnail> { | 40 | protected tryToGenerateThumbnail (video: MVideoThumbnail): Promise<MThumbnail> { |
41 | return createVideoMiniatureFromUrl({ | 41 | return updateVideoMiniatureFromUrl({ |
42 | downloadUrl: getThumbnailFromIcons(this.videoObject).url, | 42 | downloadUrl: getThumbnailFromIcons(this.videoObject).url, |
43 | video, | 43 | video, |
44 | type: ThumbnailType.MINIATURE | 44 | type: ThumbnailType.MINIATURE |
@@ -54,7 +54,7 @@ export abstract class APVideoAbstractBuilder { | |||
54 | const previewIcon = getPreviewFromIcons(this.videoObject) | 54 | const previewIcon = getPreviewFromIcons(this.videoObject) |
55 | if (!previewIcon) return | 55 | if (!previewIcon) return |
56 | 56 | ||
57 | const previewModel = createPlaceholderThumbnail({ | 57 | const previewModel = updatePlaceholderThumbnail({ |
58 | fileUrl: previewIcon.url, | 58 | fileUrl: previewIcon.url, |
59 | video, | 59 | video, |
60 | type: ThumbnailType.PREVIEW, | 60 | type: ThumbnailType.PREVIEW, |