diff options
author | Chocobozzz <me@florianbigard.com> | 2019-05-16 16:55:34 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-05-16 17:16:47 +0200 |
commit | 536598cfafab1c5e24e881db1c528489f804fb6b (patch) | |
tree | 9d15e809218174622d68d21b0c7f0a73147187db /server/models/video/video-file.ts | |
parent | 3daaa1927474869f8dbaddd6b94b4c071e314e10 (diff) | |
download | PeerTube-536598cfafab1c5e24e881db1c528489f804fb6b.tar.gz PeerTube-536598cfafab1c5e24e881db1c528489f804fb6b.tar.zst PeerTube-536598cfafab1c5e24e881db1c528489f804fb6b.zip |
Add audio support in upload
Diffstat (limited to 'server/models/video/video-file.ts')
-rw-r--r-- | server/models/video/video-file.ts | 5 |
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' | |||
24 | import { VideoRedundancyModel } from '../redundancy/video-redundancy' | 24 | import { VideoRedundancyModel } from '../redundancy/video-redundancy' |
25 | import { VideoStreamingPlaylistModel } from './video-streaming-playlist' | 25 | import { VideoStreamingPlaylistModel } from './video-streaming-playlist' |
26 | import { FindOptions, QueryTypes, Transaction } from 'sequelize' | 26 | import { FindOptions, QueryTypes, Transaction } from 'sequelize' |
27 | import { 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 && |