diff options
Diffstat (limited to 'server/lib/transcoding')
-rw-r--r-- | server/lib/transcoding/transcoding.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/server/lib/transcoding/transcoding.ts b/server/lib/transcoding/transcoding.ts index 07eee4122..44e26754d 100644 --- a/server/lib/transcoding/transcoding.ts +++ b/server/lib/transcoding/transcoding.ts | |||
@@ -342,6 +342,12 @@ async function generateHlsPlaylistCommon (options: { | |||
342 | // Move video file | 342 | // Move video file |
343 | await move(join(videoTranscodedBasePath, videoFilename), videoFilePath, { overwrite: true }) | 343 | await move(join(videoTranscodedBasePath, videoFilename), videoFilePath, { overwrite: true }) |
344 | 344 | ||
345 | // Update video duration if it was not set (in case of a live for example) | ||
346 | if (!video.duration) { | ||
347 | video.duration = await getVideoStreamDuration(videoFilePath) | ||
348 | await video.save() | ||
349 | } | ||
350 | |||
345 | const stats = await stat(videoFilePath) | 351 | const stats = await stat(videoFilePath) |
346 | 352 | ||
347 | newVideoFile.size = stats.size | 353 | newVideoFile.size = stats.size |