mirror of https://github.com/Chocobozzz/PeerTube
Do not destroy the video if transcoding fails
parent
5e4b6992ab
commit
b0ef17828c
|
@ -1138,10 +1138,10 @@ export class VideoModel extends Model<VideoModel> {
|
||||||
outputPath: videoOutputPath
|
outputPath: videoOutputPath
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
|
||||||
// Could be very long!
|
// Could be very long!
|
||||||
await transcode(transcodeOptions)
|
await transcode(transcodeOptions)
|
||||||
|
|
||||||
|
try {
|
||||||
await unlinkPromise(videoInputPath)
|
await unlinkPromise(videoInputPath)
|
||||||
|
|
||||||
// Important to do this before getVideoFilename() to take in account the new file extension
|
// Important to do this before getVideoFilename() to take in account the new file extension
|
||||||
|
|
Loading…
Reference in New Issue