aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video-file.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-10-03 16:43:57 +0200
committerChocobozzz <me@florianbigard.com>2018-10-03 16:43:57 +0200
commit25378bc866a69002d7447e5edc254ec7e469a1ec (patch)
treefd12d97cb571de83b1281554baba9c28606eaab9 /server/models/video/video-file.ts
parentbe691a57c590348fd36d6e11dc1fe4cc8eaa0719 (diff)
downloadPeerTube-25378bc866a69002d7447e5edc254ec7e469a1ec.tar.gz
PeerTube-25378bc866a69002d7447e5edc254ec7e469a1ec.tar.zst
PeerTube-25378bc866a69002d7447e5edc254ec7e469a1ec.zip
Delete correctly redundancy files
Diffstat (limited to 'server/models/video/video-file.ts')
-rw-r--r--server/models/video/video-file.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/server/models/video/video-file.ts b/server/models/video/video-file.ts
index f040803b9..adebdf0c7 100644
--- a/server/models/video/video-file.ts
+++ b/server/models/video/video-file.ts
@@ -107,6 +107,19 @@ export class VideoFileModel extends Model<VideoFileModel> {
107 }) 107 })
108 } 108 }
109 109
110 static loadWithVideo (id: number) {
111 const options = {
112 include: [
113 {
114 model: VideoModel.unscoped(),
115 required: true
116 }
117 ]
118 }
119
120 return VideoFileModel.findById(id, options)
121 }
122
110 hasSameUniqueKeysThan (other: VideoFileModel) { 123 hasSameUniqueKeysThan (other: VideoFileModel) {
111 return this.fps === other.fps && 124 return this.fps === other.fps &&
112 this.resolution === other.resolution && 125 this.resolution === other.resolution &&