diff options
author | Chocobozzz <me@florianbigard.com> | 2021-12-23 10:57:55 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-12-23 10:57:55 +0100 |
commit | 482b26231b4e39234f107b8400ef606c5f003c55 (patch) | |
tree | 1a50f292b77b9b297f0885867da9f20c02582706 /server/models/video | |
parent | c7c6afc66d7611d4c02572d63801beca26c45204 (diff) | |
download | PeerTube-482b26231b4e39234f107b8400ef606c5f003c55.tar.gz PeerTube-482b26231b4e39234f107b8400ef606c5f003c55.tar.zst PeerTube-482b26231b4e39234f107b8400ef606c5f003c55.zip |
Fix audio only transcoding
Diffstat (limited to 'server/models/video')
-rw-r--r-- | server/models/video/video-file.ts | 5 |
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' | |||
26 | import { getHLSPublicFileUrl, getWebTorrentPublicFileUrl } from '@server/lib/object-storage' | 26 | import { getHLSPublicFileUrl, getWebTorrentPublicFileUrl } from '@server/lib/object-storage' |
27 | import { getFSTorrentFilePath } from '@server/lib/paths' | 27 | import { getFSTorrentFilePath } from '@server/lib/paths' |
28 | import { isStreamingPlaylist, MStreamingPlaylistVideo, MVideo, MVideoWithHost } from '@server/types/models' | 28 | import { isStreamingPlaylist, MStreamingPlaylistVideo, MVideo, MVideoWithHost } from '@server/types/models' |
29 | import { VideoResolution, VideoStorage } from '@shared/models' | ||
29 | import { AttributesOnly } from '@shared/typescript-utils' | 30 | import { AttributesOnly } from '@shared/typescript-utils' |
30 | import { VideoStorage } from '@shared/models' | ||
31 | import { | 31 | import { |
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 () { |