diff options
author | Chocobozzz <me@florianbigard.com> | 2021-08-27 14:32:44 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-08-27 15:12:22 +0200 |
commit | 41fb13c330de629df2d23379209e79c7af0f2e9a (patch) | |
tree | 73bc5a90566406b3910f142beae2a879c1e4265d /scripts/regenerate-thumbnails.ts | |
parent | 40e7ed0714f96c01e16de3ac971a4b28116294e1 (diff) | |
download | PeerTube-41fb13c330de629df2d23379209e79c7af0f2e9a.tar.gz PeerTube-41fb13c330de629df2d23379209e79c7af0f2e9a.tar.zst PeerTube-41fb13c330de629df2d23379209e79c7af0f2e9a.zip |
esModuleInterop to true
Diffstat (limited to 'scripts/regenerate-thumbnails.ts')
-rw-r--r-- | scripts/regenerate-thumbnails.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/regenerate-thumbnails.ts b/scripts/regenerate-thumbnails.ts index 078f3830b..8075f90ba 100644 --- a/scripts/regenerate-thumbnails.ts +++ b/scripts/regenerate-thumbnails.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { registerTSPaths } from '../server/helpers/register-ts-paths' | 1 | import { registerTSPaths } from '../server/helpers/register-ts-paths' |
2 | registerTSPaths() | 2 | registerTSPaths() |
3 | 3 | ||
4 | import * as Bluebird from 'bluebird' | 4 | import { map } from 'bluebird' |
5 | import { program } from 'commander' | 5 | import { program } from 'commander' |
6 | import { pathExists, remove } from 'fs-extra' | 6 | import { pathExists, remove } from 'fs-extra' |
7 | import { generateImageFilename, processImage } from '@server/helpers/image-utils' | 7 | import { generateImageFilename, processImage } from '@server/helpers/image-utils' |
@@ -23,7 +23,7 @@ async function run () { | |||
23 | 23 | ||
24 | const videos = await VideoModel.listLocal() | 24 | const videos = await VideoModel.listLocal() |
25 | 25 | ||
26 | await Bluebird.map(videos, v => { | 26 | await map(videos, v => { |
27 | return processVideo(v) | 27 | return processVideo(v) |
28 | .catch(err => console.error('Cannot process video %s.', v.url, err)) | 28 | .catch(err => console.error('Cannot process video %s.', v.url, err)) |
29 | }, { concurrency: 20 }) | 29 | }, { concurrency: 20 }) |