]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/video-file.ts
Update server dependencies
[github/Chocobozzz/PeerTube.git] / server / models / video / video-file.ts
index 87311c0edbd671b72b71cf48dcf43c8f64ec7c51..1a9f4561af51747cfe11e388fbb185598e99b52a 100644 (file)
@@ -18,7 +18,7 @@ import {
   Table,
   UpdatedAt
 } from 'sequelize-typescript'
-import { Where } from 'sequelize/types/lib/utils'
+import { Where } from 'sequelize/types/utils'
 import validator from 'validator'
 import { buildRemoteVideoBaseUrl } from '@server/helpers/activitypub'
 import { logger } from '@server/helpers/logger'
@@ -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 { AttributesOnly } from '@shared/core-utils'
-import { VideoStorage } from '@shared/models'
+import { VideoResolution, VideoStorage } from '@shared/models'
+import { AttributesOnly } from '@shared/typescript-utils'
 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<Partial<AttributesOnly<VideoFileModel>
   }
 
   isAudio () {
-    return !!MIMETYPES.AUDIO.EXT_MIMETYPE[this.extname]
+    return this.resolution === VideoResolution.H_NOVIDEO
   }
 
   isLive () {