aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video-file.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video/video-file.ts')
-rw-r--r--server/models/video/video-file.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/server/models/video/video-file.ts b/server/models/video/video-file.ts
index 2203a7aba..05c490759 100644
--- a/server/models/video/video-file.ts
+++ b/server/models/video/video-file.ts
@@ -24,6 +24,7 @@ import { VideoModel } from './video'
24import { VideoRedundancyModel } from '../redundancy/video-redundancy' 24import { 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'
27 28
28@Table({ 29@Table({
29 tableName: 'videoFile', 30 tableName: 'videoFile',
@@ -161,6 +162,10 @@ export class VideoFileModel extends Model<VideoFileModel> {
161 })) 162 }))
162 } 163 }
163 164
165 isAudio () {
166 return !!MIMETYPES.AUDIO.EXT_MIMETYPE[this.extname]
167 }
168
164 hasSameUniqueKeysThan (other: VideoFileModel) { 169 hasSameUniqueKeysThan (other: VideoFileModel) {
165 return this.fps === other.fps && 170 return this.fps === other.fps &&
166 this.resolution === other.resolution && 171 this.resolution === other.resolution &&