From d636ab58d042494ef9d17b2d9c4c841bae01c897 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 22 Aug 2019 10:46:54 +0200 Subject: Fix html tag with blacklisted video --- server/models/video/video.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'server/models/video/video.ts') diff --git a/server/models/video/video.ts b/server/models/video/video.ts index ab7b49f1e..6a95f6ef7 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts @@ -135,6 +135,7 @@ import { MVideoFullLight, MVideoIdThumbnail, MVideoThumbnail, + MVideoThumbnailBlacklist, MVideoWithAllFiles, MVideoWithFile, MVideoWithRights @@ -1409,6 +1410,19 @@ export class VideoModel extends Model { return VideoModel.scope(ScopeNames.WITH_THUMBNAILS).findOne(options) } + static loadWithBlacklist (id: number | string, t?: Transaction): Bluebird { + const where = buildWhereIdOrUUID(id) + const options = { + where, + transaction: t + } + + return VideoModel.scope([ + ScopeNames.WITH_THUMBNAILS, + ScopeNames.WITH_BLACKLISTED + ]).findOne(options) + } + static loadWithRights (id: number | string, t?: Transaction): Bluebird { const where = buildWhereIdOrUUID(id) const options = { -- cgit v1.2.3