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.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 &&