From 482b26231b4e39234f107b8400ef606c5f003c55 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 23 Dec 2021 10:57:55 +0100 Subject: Fix audio only transcoding --- server/models/video/video-file.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'server/models/video') 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' import { getHLSPublicFileUrl, getWebTorrentPublicFileUrl } from '@server/lib/object-storage' import { getFSTorrentFilePath } from '@server/lib/paths' import { isStreamingPlaylist, MStreamingPlaylistVideo, MVideo, MVideoWithHost } from '@server/types/models' +import { VideoResolution, VideoStorage } from '@shared/models' import { AttributesOnly } from '@shared/typescript-utils' -import { VideoStorage } from '@shared/models' import { isVideoFileExtnameValid, isVideoFileInfoHashValid, @@ -39,7 +39,6 @@ import { LAZY_STATIC_PATHS, MEMOIZE_LENGTH, MEMOIZE_TTL, - MIMETYPES, STATIC_DOWNLOAD_PATHS, STATIC_PATHS, WEBSERVER @@ -448,7 +447,7 @@ export class VideoFileModel extends Model } isAudio () { - return !!MIMETYPES.AUDIO.EXT_MIMETYPE[this.extname] + return this.resolution === VideoResolution.H_NOVIDEO } isLive () { -- cgit v1.2.3