diff options
author | Chocobozzz <me@florianbigard.com> | 2022-11-07 10:25:24 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-11-07 10:25:24 +0100 |
commit | a32bf8cd20212b903d3fa478e629f051eb77fecc (patch) | |
tree | 2a0372477ae2d76c31fc749054e78f1d067807d3 /server/models | |
parent | 11ae7e2917ddf6e3c8e53d0855fd786163112d59 (diff) | |
download | PeerTube-a32bf8cd20212b903d3fa478e629f051eb77fecc.tar.gz PeerTube-a32bf8cd20212b903d3fa478e629f051eb77fecc.tar.zst PeerTube-a32bf8cd20212b903d3fa478e629f051eb77fecc.zip |
Fix running again transcoding on a video only file
Diffstat (limited to 'server/models')
-rw-r--r-- | server/models/video/video.ts | 4 |
1 files changed, 3 insertions, 1 deletions
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' | |||
34 | import { getServerActor } from '@server/models/application/application' | 34 | import { getServerActor } from '@server/models/application/application' |
35 | import { ModelCache } from '@server/models/model-cache' | 35 | import { ModelCache } from '@server/models/model-cache' |
36 | import { buildVideoEmbedPath, buildVideoWatchPath, pick } from '@shared/core-utils' | 36 | import { buildVideoEmbedPath, buildVideoWatchPath, pick } from '@shared/core-utils' |
37 | import { ffprobePromise, getAudioStream, uuidToShort } from '@shared/extra-utils' | 37 | import { ffprobePromise, getAudioStream, hasAudioStream, uuidToShort } from '@shared/extra-utils' |
38 | import { | 38 | import { |
39 | ResultList, | 39 | ResultList, |
40 | ThumbnailType, | 40 | ThumbnailType, |
@@ -1751,9 +1751,11 @@ export class VideoModel extends Model<Partial<AttributesOnly<VideoModel>>> { | |||
1751 | const probe = await ffprobePromise(originalFilePath) | 1751 | const probe = await ffprobePromise(originalFilePath) |
1752 | 1752 | ||
1753 | const { audioStream } = await getAudioStream(originalFilePath, probe) | 1753 | const { audioStream } = await getAudioStream(originalFilePath, probe) |
1754 | const hasAudio = await hasAudioStream(originalFilePath, probe) | ||
1754 | 1755 | ||
1755 | return { | 1756 | return { |
1756 | audioStream, | 1757 | audioStream, |
1758 | hasAudio, | ||
1757 | 1759 | ||
1758 | ...await getVideoStreamDimensionsInfo(originalFilePath, probe) | 1760 | ...await getVideoStreamDimensionsInfo(originalFilePath, probe) |
1759 | } | 1761 | } |