]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/video-transcoding.ts
Translated using Weblate (Kabyle)
[github/Chocobozzz/PeerTube.git] / server / lib / video-transcoding.ts
index b366e2e44ce68b7dc8fdbaa70ba9ec620960f601..c949dca2ef035c4b7eb4b4db78624b14f1105242 100644 (file)
@@ -166,6 +166,7 @@ async function mergeAudioVideofile (video: MVideoFullLight, resolution: VideoRes
 
   // Important to do this before getVideoFilename() to take in account the new file extension
   inputVideoFile.extname = newExtname
+  inputVideoFile.filename = generateVideoFilename(video, false, inputVideoFile.resolution, newExtname)
 
   const videoOutputPath = getVideoFilePath(video, inputVideoFile)
   // ffmpeg generated a new video file, so update the video duration
@@ -253,7 +254,7 @@ async function onWebTorrentVideoFileTranscoding (
   videoFile.fps = fps
   videoFile.metadata = metadata
 
-  await createTorrentAndSetInfoHash(video, video, videoFile)
+  await createTorrentAndSetInfoHash(video, videoFile)
 
   await VideoFileModel.customUpsert(videoFile, 'video', undefined)
   video.VideoFiles = await video.$get('VideoFiles')
@@ -349,7 +350,7 @@ async function generateHlsPlaylistCommon (options: {
   newVideoFile.fps = await getVideoFileFPS(videoFilePath)
   newVideoFile.metadata = await getMetadataFromFile(videoFilePath)
 
-  await createTorrentAndSetInfoHash(videoStreamingPlaylist, video, newVideoFile)
+  await createTorrentAndSetInfoHash(videoStreamingPlaylist, newVideoFile)
 
   await VideoFileModel.customUpsert(newVideoFile, 'streaming-playlist', undefined)
   videoStreamingPlaylist.VideoFiles = await videoStreamingPlaylist.$get('VideoFiles')