]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/api/videos.js
Server: Fix video propagation with transcoding enabled
[github/Chocobozzz/PeerTube.git] / server / controllers / api / videos.js
index 0be7d9d8328f38ac84353a7c410b48607fcbfe9a..4a4c5e162c0f7b21d7586b015073db6f27812c15 100644 (file)
@@ -379,6 +379,9 @@ function addVideo (req, res, videoFile, finalCallback) {
     },
 
     function sendToFriends (t, video, callback) {
+      // Let transcoding job send the video to friends because the videofile extension might change
+      if (constants.CONFIG.TRANSCODING.ENABLED === true) return callback(null, t)
+
       video.toAddRemoteJSON(function (err, remoteVideo) {
         if (err) return callback(err)