From 25378bc866a69002d7447e5edc254ec7e469a1ec Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 3 Oct 2018 16:43:57 +0200 Subject: Delete correctly redundancy files --- server/models/video/video-file.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'server/models/video') 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 { }) } + static loadWithVideo (id: number) { + const options = { + include: [ + { + model: VideoModel.unscoped(), + required: true + } + ] + } + + return VideoFileModel.findById(id, options) + } + hasSameUniqueKeysThan (other: VideoFileModel) { return this.fps === other.fps && this.resolution === other.resolution && -- cgit v1.2.3