aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/regenerate-thumbnails.ts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/regenerate-thumbnails.ts')
-rw-r--r--scripts/regenerate-thumbnails.ts5
1 files changed, 2 insertions, 3 deletions
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()
4import * as Bluebird from 'bluebird' 4import * as Bluebird from 'bluebird'
5import * as program from 'commander' 5import * as program from 'commander'
6import { pathExists, remove } from 'fs-extra' 6import { pathExists, remove } from 'fs-extra'
7import { processImage } from '@server/helpers/image-utils' 7import { generateImageFilename, processImage } from '@server/helpers/image-utils'
8import { THUMBNAILS_SIZE } from '@server/initializers/constants' 8import { THUMBNAILS_SIZE } from '@server/initializers/constants'
9import { VideoModel } from '@server/models/video/video' 9import { VideoModel } from '@server/models/video/video'
10import { MVideo } from '@server/types/models' 10import { MVideo } from '@server/types/models'
11import { initDatabaseModels } from '@server/initializers/database' 11import { initDatabaseModels } from '@server/initializers/database'
12import { ActorImageModel } from '@server/models/account/actor-image'
13 12
14program 13program
15 .description('Regenerate local thumbnails using preview files') 14 .description('Regenerate local thumbnails using preview files')
@@ -52,7 +51,7 @@ async function processVideo (videoArg: MVideo) {
52 const oldPath = thumbnail.getPath() 51 const oldPath = thumbnail.getPath()
53 52
54 // Update thumbnail 53 // Update thumbnail
55 thumbnail.filename = ActorImageModel.generateFilename() 54 thumbnail.filename = generateImageFilename()
56 thumbnail.width = size.width 55 thumbnail.width = size.width
57 thumbnail.height = size.height 56 thumbnail.height = size.height
58 57