]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/ffmpeg-utils.ts
Don't call watching endpoint if history is disabled
[github/Chocobozzz/PeerTube.git] / server / helpers / ffmpeg-utils.ts
index 0caa86efcc664739ec51b25f3b27e55658840a6b..c7296054daa6c365af98f2f287322921203b8d9b 100644 (file)
@@ -184,7 +184,7 @@ function getVideoFileStream (path: string) {
       if (err) return rej(err)
 
       const videoStream = metadata.streams.find(s => s.codec_type === 'video')
-      if (!videoStream) throw new Error('Cannot find video stream of ' + path)
+      if (!videoStream) return rej(new Error('Cannot find video stream of ' + path))
 
       return res(videoStream)
     })