aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video/video.ts')
-rw-r--r--server/models/video/video.ts14
1 files changed, 14 insertions, 0 deletions
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 {
135 MVideoFullLight, 135 MVideoFullLight,
136 MVideoIdThumbnail, 136 MVideoIdThumbnail,
137 MVideoThumbnail, 137 MVideoThumbnail,
138 MVideoThumbnailBlacklist,
138 MVideoWithAllFiles, 139 MVideoWithAllFiles,
139 MVideoWithFile, 140 MVideoWithFile,
140 MVideoWithRights 141 MVideoWithRights
@@ -1409,6 +1410,19 @@ export class VideoModel extends Model<VideoModel> {
1409 return VideoModel.scope(ScopeNames.WITH_THUMBNAILS).findOne(options) 1410 return VideoModel.scope(ScopeNames.WITH_THUMBNAILS).findOne(options)
1410 } 1411 }
1411 1412
1413 static loadWithBlacklist (id: number | string, t?: Transaction): Bluebird<MVideoThumbnailBlacklist> {
1414 const where = buildWhereIdOrUUID(id)
1415 const options = {
1416 where,
1417 transaction: t
1418 }
1419
1420 return VideoModel.scope([
1421 ScopeNames.WITH_THUMBNAILS,
1422 ScopeNames.WITH_BLACKLISTED
1423 ]).findOne(options)
1424 }
1425
1412 static loadWithRights (id: number | string, t?: Transaction): Bluebird<MVideoWithRights> { 1426 static loadWithRights (id: number | string, t?: Transaction): Bluebird<MVideoWithRights> {
1413 const where = buildWhereIdOrUUID(id) 1427 const where = buildWhereIdOrUUID(id)
1414 const options = { 1428 const options = {