aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video-file.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-08-15 11:53:26 +0200
committerChocobozzz <me@florianbigard.com>2019-08-19 17:26:35 +0200
commit453e83ea5d81d203ba34bc43cd5c2c750ba40568 (patch)
tree604e02f4343d13a4ba42e1fb7527ba6ab9111712 /server/models/video/video-file.ts
parent13176a07a95984a53cc59aec5217f2ce9806d1bc (diff)
downloadPeerTube-453e83ea5d81d203ba34bc43cd5c2c750ba40568.tar.gz
PeerTube-453e83ea5d81d203ba34bc43cd5c2c750ba40568.tar.zst
PeerTube-453e83ea5d81d203ba34bc43cd5c2c750ba40568.zip
Stronger model typings
Diffstat (limited to 'server/models/video/video-file.ts')
-rw-r--r--server/models/video/video-file.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/models/video/video-file.ts b/server/models/video/video-file.ts
index 05c490759..6304f741c 100644
--- a/server/models/video/video-file.ts
+++ b/server/models/video/video-file.ts
@@ -25,6 +25,7 @@ import { VideoRedundancyModel } from '../redundancy/video-redundancy'
25import { VideoStreamingPlaylistModel } from './video-streaming-playlist' 25import { VideoStreamingPlaylistModel } from './video-streaming-playlist'
26import { FindOptions, QueryTypes, Transaction } from 'sequelize' 26import { FindOptions, QueryTypes, Transaction } from 'sequelize'
27import { MIMETYPES } from '../../initializers/constants' 27import { MIMETYPES } from '../../initializers/constants'
28import { MVideoFile } from '@server/typings/models'
28 29
29@Table({ 30@Table({
30 tableName: 'videoFile', 31 tableName: 'videoFile',
@@ -166,7 +167,7 @@ export class VideoFileModel extends Model<VideoFileModel> {
166 return !!MIMETYPES.AUDIO.EXT_MIMETYPE[this.extname] 167 return !!MIMETYPES.AUDIO.EXT_MIMETYPE[this.extname]
167 } 168 }
168 169
169 hasSameUniqueKeysThan (other: VideoFileModel) { 170 hasSameUniqueKeysThan (other: MVideoFile) {
170 return this.fps === other.fps && 171 return this.fps === other.fps &&
171 this.resolution === other.resolution && 172 this.resolution === other.resolution &&
172 this.videoId === other.videoId 173 this.videoId === other.videoId