From a0eeb45f14bab539f505861cad8f5d42d9ba30cb Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 8 Apr 2021 10:35:49 +0200 Subject: Update data in DB when regenerate thumbnails --- server/lib/thumbnail.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'server/lib/thumbnail.ts') diff --git a/server/lib/thumbnail.ts b/server/lib/thumbnail.ts index 106f5fdaa..e1176ac08 100644 --- a/server/lib/thumbnail.ts +++ b/server/lib/thumbnail.ts @@ -1,4 +1,5 @@ import { join } from 'path' +import { ActorImageModel } from '@server/models/account/actor-image' import { ThumbnailType } from '../../shared/models/videos/thumbnail.type' import { generateImageFromVideoFile } from '../helpers/ffmpeg-utils' import { processImage } from '../helpers/image-utils' @@ -200,7 +201,7 @@ function buildMetadataFromVideo (video: MVideoThumbnail, type: ThumbnailType, si : undefined if (type === ThumbnailType.MINIATURE) { - const filename = video.generateThumbnailName() + const filename = ActorImageModel.generateFilename() const basePath = CONFIG.STORAGE.THUMBNAILS_DIR return { @@ -214,7 +215,7 @@ function buildMetadataFromVideo (video: MVideoThumbnail, type: ThumbnailType, si } if (type === ThumbnailType.PREVIEW) { - const filename = video.generatePreviewName() + const filename = ActorImageModel.generateFilename() const basePath = CONFIG.STORAGE.PREVIEWS_DIR return { -- cgit v1.2.3