From a32bf8cd20212b903d3fa478e629f051eb77fecc Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 7 Nov 2022 10:25:24 +0100 Subject: Fix running again transcoding on a video only file --- server/models/video/video.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'server/models') diff --git a/server/models/video/video.ts b/server/models/video/video.ts index f3907bed4..56cc45cfe 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts @@ -34,7 +34,7 @@ import { isVideoInPrivateDirectory } from '@server/lib/video-privacy' import { getServerActor } from '@server/models/application/application' import { ModelCache } from '@server/models/model-cache' import { buildVideoEmbedPath, buildVideoWatchPath, pick } from '@shared/core-utils' -import { ffprobePromise, getAudioStream, uuidToShort } from '@shared/extra-utils' +import { ffprobePromise, getAudioStream, hasAudioStream, uuidToShort } from '@shared/extra-utils' import { ResultList, ThumbnailType, @@ -1751,9 +1751,11 @@ export class VideoModel extends Model>> { const probe = await ffprobePromise(originalFilePath) const { audioStream } = await getAudioStream(originalFilePath, probe) + const hasAudio = await hasAudioStream(originalFilePath, probe) return { audioStream, + hasAudio, ...await getVideoStreamDimensionsInfo(originalFilePath, probe) } -- cgit v1.2.3