diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-27 16:23:34 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-27 16:23:34 +0200 |
commit | 62689b942b71cd1dd0d050c6ed05f884a0b325c2 (patch) | |
tree | c45c35d35d7a3e32621fba06edc63646930c8efd /server/helpers/ffmpeg-utils.ts | |
parent | 84b6dbcc6e8654f39ec798905e1151ba915cd1aa (diff) | |
download | PeerTube-62689b942b71cd1dd0d050c6ed05f884a0b325c2.tar.gz PeerTube-62689b942b71cd1dd0d050c6ed05f884a0b325c2.tar.zst PeerTube-62689b942b71cd1dd0d050c6ed05f884a0b325c2.zip |
Correctly migrate to fs-extra
Diffstat (limited to 'server/helpers/ffmpeg-utils.ts')
-rw-r--r-- | server/helpers/ffmpeg-utils.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/helpers/ffmpeg-utils.ts b/server/helpers/ffmpeg-utils.ts index 8936005e0..7c45f3632 100644 --- a/server/helpers/ffmpeg-utils.ts +++ b/server/helpers/ffmpeg-utils.ts | |||
@@ -1,11 +1,11 @@ | |||
1 | import * as ffmpeg from 'fluent-ffmpeg' | 1 | import * as ffmpeg from 'fluent-ffmpeg' |
2 | import { join } from 'path' | 2 | import { join } from 'path' |
3 | import { VideoResolution } from '../../shared/models/videos' | 3 | import { VideoResolution } from '../../shared/models/videos' |
4 | import { CONFIG, VIDEO_TRANSCODING_FPS, FFMPEG_NICE } from '../initializers' | 4 | import { CONFIG, FFMPEG_NICE, VIDEO_TRANSCODING_FPS } from '../initializers' |
5 | import { unlinkPromise } from './core-utils' | ||
6 | import { processImage } from './image-utils' | 5 | import { processImage } from './image-utils' |
7 | import { logger } from './logger' | 6 | import { logger } from './logger' |
8 | import { checkFFmpegEncoders } from '../initializers/checker' | 7 | import { checkFFmpegEncoders } from '../initializers/checker' |
8 | import { remove } from 'fs-extra' | ||
9 | 9 | ||
10 | function computeResolutionsToTranscode (videoFileHeight: number) { | 10 | function computeResolutionsToTranscode (videoFileHeight: number) { |
11 | const resolutionsEnabled: number[] = [] | 11 | const resolutionsEnabled: number[] = [] |
@@ -90,7 +90,7 @@ async function generateImageFromVideoFile (fromPath: string, folder: string, ima | |||
90 | logger.error('Cannot generate image from video %s.', fromPath, { err }) | 90 | logger.error('Cannot generate image from video %s.', fromPath, { err }) |
91 | 91 | ||
92 | try { | 92 | try { |
93 | await unlinkPromise(pendingImagePath) | 93 | await remove(pendingImagePath) |
94 | } catch (err) { | 94 | } catch (err) { |
95 | logger.debug('Cannot remove pending image path after generation error.', { err }) | 95 | logger.debug('Cannot remove pending image path after generation error.', { err }) |
96 | } | 96 | } |