diff options
Diffstat (limited to 'scripts/regenerate-thumbnails.ts')
-rw-r--r-- | scripts/regenerate-thumbnails.ts | 5 |
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() | |||
4 | import * as Bluebird from 'bluebird' | 4 | import * as Bluebird from 'bluebird' |
5 | import * as program from 'commander' | 5 | import * as program from 'commander' |
6 | import { pathExists, remove } from 'fs-extra' | 6 | import { pathExists, remove } from 'fs-extra' |
7 | import { processImage } from '@server/helpers/image-utils' | 7 | import { generateImageFilename, processImage } from '@server/helpers/image-utils' |
8 | import { THUMBNAILS_SIZE } from '@server/initializers/constants' | 8 | import { THUMBNAILS_SIZE } from '@server/initializers/constants' |
9 | import { VideoModel } from '@server/models/video/video' | 9 | import { VideoModel } from '@server/models/video/video' |
10 | import { MVideo } from '@server/types/models' | 10 | import { MVideo } from '@server/types/models' |
11 | import { initDatabaseModels } from '@server/initializers/database' | 11 | import { initDatabaseModels } from '@server/initializers/database' |
12 | import { ActorImageModel } from '@server/models/account/actor-image' | ||
13 | 12 | ||
14 | program | 13 | program |
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 | ||