From 84531547bc0934a2abda586d539f7455b455d488 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 8 Apr 2021 11:23:45 +0200 Subject: Add size info in db for actor images --- scripts/regenerate-thumbnails.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/regenerate-thumbnails.ts b/scripts/regenerate-thumbnails.ts index 0213b8a22..b95343c0b 100644 --- a/scripts/regenerate-thumbnails.ts +++ b/scripts/regenerate-thumbnails.ts @@ -4,12 +4,11 @@ registerTSPaths() import * as Bluebird from 'bluebird' import * as program from 'commander' import { pathExists, remove } from 'fs-extra' -import { processImage } from '@server/helpers/image-utils' +import { generateImageFilename, processImage } from '@server/helpers/image-utils' import { THUMBNAILS_SIZE } from '@server/initializers/constants' import { VideoModel } from '@server/models/video/video' import { MVideo } from '@server/types/models' import { initDatabaseModels } from '@server/initializers/database' -import { ActorImageModel } from '@server/models/account/actor-image' program .description('Regenerate local thumbnails using preview files') @@ -52,7 +51,7 @@ async function processVideo (videoArg: MVideo) { const oldPath = thumbnail.getPath() // Update thumbnail - thumbnail.filename = ActorImageModel.generateFilename() + thumbnail.filename = generateImageFilename() thumbnail.width = size.width thumbnail.height = size.height -- cgit v1.2.3