aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-12-23 10:57:55 +0100
committerChocobozzz <me@florianbigard.com>2021-12-23 10:57:55 +0100
commit482b26231b4e39234f107b8400ef606c5f003c55 (patch)
tree1a50f292b77b9b297f0885867da9f20c02582706 /server/models
parentc7c6afc66d7611d4c02572d63801beca26c45204 (diff)
downloadPeerTube-482b26231b4e39234f107b8400ef606c5f003c55.tar.gz
PeerTube-482b26231b4e39234f107b8400ef606c5f003c55.tar.zst
PeerTube-482b26231b4e39234f107b8400ef606c5f003c55.zip
Fix audio only transcoding
Diffstat (limited to 'server/models')
-rw-r--r--server/models/video/video-file.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/server/models/video/video-file.ts b/server/models/video/video-file.ts
index 2b5ec3a20..6f03fae3a 100644
--- a/server/models/video/video-file.ts
+++ b/server/models/video/video-file.ts
@@ -26,8 +26,8 @@ import { extractVideo } from '@server/helpers/video'
26import { getHLSPublicFileUrl, getWebTorrentPublicFileUrl } from '@server/lib/object-storage' 26import { getHLSPublicFileUrl, getWebTorrentPublicFileUrl } from '@server/lib/object-storage'
27import { getFSTorrentFilePath } from '@server/lib/paths' 27import { getFSTorrentFilePath } from '@server/lib/paths'
28import { isStreamingPlaylist, MStreamingPlaylistVideo, MVideo, MVideoWithHost } from '@server/types/models' 28import { isStreamingPlaylist, MStreamingPlaylistVideo, MVideo, MVideoWithHost } from '@server/types/models'
29import { VideoResolution, VideoStorage } from '@shared/models'
29import { AttributesOnly } from '@shared/typescript-utils' 30import { AttributesOnly } from '@shared/typescript-utils'
30import { VideoStorage } from '@shared/models'
31import { 31import {
32 isVideoFileExtnameValid, 32 isVideoFileExtnameValid,
33 isVideoFileInfoHashValid, 33 isVideoFileInfoHashValid,
@@ -39,7 +39,6 @@ import {
39 LAZY_STATIC_PATHS, 39 LAZY_STATIC_PATHS,
40 MEMOIZE_LENGTH, 40 MEMOIZE_LENGTH,
41 MEMOIZE_TTL, 41 MEMOIZE_TTL,
42 MIMETYPES,
43 STATIC_DOWNLOAD_PATHS, 42 STATIC_DOWNLOAD_PATHS,
44 STATIC_PATHS, 43 STATIC_PATHS,
45 WEBSERVER 44 WEBSERVER
@@ -448,7 +447,7 @@ export class VideoFileModel extends Model<Partial<AttributesOnly<VideoFileModel>
448 } 447 }
449 448
450 isAudio () { 449 isAudio () {
451 return !!MIMETYPES.AUDIO.EXT_MIMETYPE[this.extname] 450 return this.resolution === VideoResolution.H_NOVIDEO
452 } 451 }
453 452
454 isLive () { 453 isLive () {