From 91f8f8db97ffb83701c30f9cdb1e804670434eb0 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 4 Jun 2021 09:19:01 +0200 Subject: createThumbnail -> updateThumbnail --- server/lib/activitypub/playlists/create-update.ts | 4 ++-- server/lib/activitypub/videos/shared/abstract-builder.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'server/lib/activitypub') 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' import { logger, loggerTagsFactory } from '@server/helpers/logger' import { CRAWL_REQUEST_CONCURRENCY } from '@server/initializers/constants' import { sequelizeTypescript } from '@server/initializers/database' -import { createPlaylistMiniatureFromUrl } from '@server/lib/thumbnail' +import { updatePlaylistMiniatureFromUrl } from '@server/lib/thumbnail' import { VideoPlaylistModel } from '@server/models/video/video-playlist' import { VideoPlaylistElementModel } from '@server/models/video/video-playlist-element' import { FilteredModelAttributes } from '@server/types' @@ -98,7 +98,7 @@ async function fetchElementUrls (playlistObject: PlaylistObject) { async function updatePlaylistThumbnail (playlistObject: PlaylistObject, playlist: MVideoPlaylistFull) { if (playlistObject.icon) { - const thumbnailModel = await createPlaylistMiniatureFromUrl({ downloadUrl: playlistObject.icon.url, playlist }) + const thumbnailModel = await updatePlaylistMiniatureFromUrl({ downloadUrl: playlistObject.icon.url, playlist }) await playlist.setAndSaveThumbnail(thumbnailModel, undefined) 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' import { checkUrlsSameHost } from '@server/helpers/activitypub' import { deleteNonExistingModels } from '@server/helpers/database-utils' import { logger, LoggerTagsFn } from '@server/helpers/logger' -import { createPlaceholderThumbnail, createVideoMiniatureFromUrl } from '@server/lib/thumbnail' +import { updatePlaceholderThumbnail, updateVideoMiniatureFromUrl } from '@server/lib/thumbnail' import { setVideoTags } from '@server/lib/video' import { VideoCaptionModel } from '@server/models/video/video-caption' import { VideoFileModel } from '@server/models/video/video-file' @@ -38,7 +38,7 @@ export abstract class APVideoAbstractBuilder { } protected tryToGenerateThumbnail (video: MVideoThumbnail): Promise { - return createVideoMiniatureFromUrl({ + return updateVideoMiniatureFromUrl({ downloadUrl: getThumbnailFromIcons(this.videoObject).url, video, type: ThumbnailType.MINIATURE @@ -54,7 +54,7 @@ export abstract class APVideoAbstractBuilder { const previewIcon = getPreviewFromIcons(this.videoObject) if (!previewIcon) return - const previewModel = createPlaceholderThumbnail({ + const previewModel = updatePlaceholderThumbnail({ fileUrl: previewIcon.url, video, type: ThumbnailType.PREVIEW, -- cgit v1.2.3