Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Do not destroy the video if transcoding fails

Chocobozzzb0ef17828c41
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index f6a21814cf..1b9d680731 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -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