mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 18:29:27 +02:00
Fix saved live master playlist bandwidth
This commit is contained in:
parent
405c83f9af
commit
e4fc3697ac
3 changed files with 10 additions and 12 deletions
|
@ -342,6 +342,12 @@ async function generateHlsPlaylistCommon (options: {
|
|||
// Move video file
|
||||
await move(join(videoTranscodedBasePath, videoFilename), videoFilePath, { overwrite: true })
|
||||
|
||||
// Update video duration if it was not set (in case of a live for example)
|
||||
if (!video.duration) {
|
||||
video.duration = await getVideoStreamDuration(videoFilePath)
|
||||
await video.save()
|
||||
}
|
||||
|
||||
const stats = await stat(videoFilePath)
|
||||
|
||||
newVideoFile.size = stats.size
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue