Do not destroy the video if transcoding fails

pull/333/head
Chocobozzz 2018-03-08 14:09:09 +01:00
parent 5e4b6992ab
commit b0ef17828c
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 3 additions and 3 deletions

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