Do not destroy the video if transcoding fails

This commit is contained in:
Chocobozzz
2018-03-08 14:09:09 +01:00
parent 5e4b6992ab
commit b0ef17828c

View File

@@ -1138,10 +1138,10 @@ export class VideoModel extends Model<VideoModel> {
outputPath: videoOutputPath
}
try {
// Could be very long!
await transcode(transcodeOptions)
// Could be very long!
await transcode(transcodeOptions)
try {
await unlinkPromise(videoInputPath)
// Important to do this before getVideoFilename() to take in account the new file extension