Update server dependencies
[oweals/peertube.git] / server / models / video / video-file.ts
index 05c4907594fbbd36c7d86e0e8a5373c3fe24a664..68e2d562a318f9d11ffc8b0e908cf075ff8885dc 100644 (file)
@@ -25,6 +25,7 @@ import { VideoRedundancyModel } from '../redundancy/video-redundancy'
 import { VideoStreamingPlaylistModel } from './video-streaming-playlist'
 import { FindOptions, QueryTypes, Transaction } from 'sequelize'
 import { MIMETYPES } from '../../initializers/constants'
+import { MVideoFile } from '@server/typings/models'
 
 @Table({
   tableName: 'videoFile',
@@ -98,7 +99,7 @@ export class VideoFileModel extends Model<VideoFileModel> {
   static doesInfohashExist (infoHash: string) {
     const query = 'SELECT 1 FROM "videoFile" WHERE "infoHash" = $infoHash LIMIT 1'
     const options = {
-      type: QueryTypes.SELECT,
+      type: QueryTypes.SELECT as QueryTypes.SELECT,
       bind: { infoHash },
       raw: true
     }
@@ -166,7 +167,7 @@ export class VideoFileModel extends Model<VideoFileModel> {
     return !!MIMETYPES.AUDIO.EXT_MIMETYPE[this.extname]
   }
 
-  hasSameUniqueKeysThan (other: VideoFileModel) {
+  hasSameUniqueKeysThan (other: MVideoFile) {
     return this.fps === other.fps &&
       this.resolution === other.resolution &&
       this.videoId === other.videoId