aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models
diff options
context:
space:
mode:
Diffstat (limited to 'server/models')
-rw-r--r--server/models/video/sql/video/video-model-get-query-builder.ts18
-rw-r--r--server/models/video/video.ts4
2 files changed, 11 insertions, 11 deletions
diff --git a/server/models/video/sql/video/video-model-get-query-builder.ts b/server/models/video/sql/video/video-model-get-query-builder.ts
index 32e5c4ff7..29e59c8be 100644
--- a/server/models/video/sql/video/video-model-get-query-builder.ts
+++ b/server/models/video/sql/video/video-model-get-query-builder.ts
@@ -13,7 +13,7 @@ import { VideoTableAttributes } from './shared/video-table-attributes'
13 13
14export type GetType = 14export type GetType =
15 'api' | 15 'api' |
16 'full-light' | 16 'full' |
17 'account-blacklist-files' | 17 'account-blacklist-files' |
18 'all-files' | 18 'all-files' |
19 'thumbnails' | 19 'thumbnails' |
@@ -40,7 +40,7 @@ export class VideoModelGetQueryBuilder {
40 40
41 private readonly videoModelBuilder: VideoModelBuilder 41 private readonly videoModelBuilder: VideoModelBuilder
42 42
43 private static readonly videoFilesInclude = new Set<GetType>([ 'api', 'full-light', 'account-blacklist-files', 'all-files' ]) 43 private static readonly videoFilesInclude = new Set<GetType>([ 'api', 'full', 'account-blacklist-files', 'all-files' ])
44 44
45 constructor (protected readonly sequelize: Sequelize) { 45 constructor (protected readonly sequelize: Sequelize) {
46 this.videoQueryBuilder = new VideosModelGetQuerySubBuilder(sequelize) 46 this.videoQueryBuilder = new VideosModelGetQuerySubBuilder(sequelize)
@@ -96,16 +96,16 @@ export class VideosModelGetQuerySubBuilder extends AbstractVideoQueryBuilder {
96 protected streamingPlaylistFilesQuery: string 96 protected streamingPlaylistFilesQuery: string
97 97
98 private static readonly trackersInclude = new Set<GetType>([ 'api' ]) 98 private static readonly trackersInclude = new Set<GetType>([ 'api' ])
99 private static readonly liveInclude = new Set<GetType>([ 'api', 'full-light' ]) 99 private static readonly liveInclude = new Set<GetType>([ 'api', 'full' ])
100 private static readonly scheduleUpdateInclude = new Set<GetType>([ 'api', 'full-light' ]) 100 private static readonly scheduleUpdateInclude = new Set<GetType>([ 'api', 'full' ])
101 private static readonly tagsInclude = new Set<GetType>([ 'api', 'full-light' ]) 101 private static readonly tagsInclude = new Set<GetType>([ 'api', 'full' ])
102 private static readonly userHistoryInclude = new Set<GetType>([ 'api', 'full-light' ]) 102 private static readonly userHistoryInclude = new Set<GetType>([ 'api', 'full' ])
103 private static readonly accountInclude = new Set<GetType>([ 'api', 'full-light', 'account-blacklist-files' ]) 103 private static readonly accountInclude = new Set<GetType>([ 'api', 'full', 'account-blacklist-files' ])
104 private static readonly ownerUserInclude = new Set<GetType>([ 'blacklist-rights' ]) 104 private static readonly ownerUserInclude = new Set<GetType>([ 'blacklist-rights' ])
105 105
106 private static readonly blacklistedInclude = new Set<GetType>([ 106 private static readonly blacklistedInclude = new Set<GetType>([
107 'api', 107 'api',
108 'full-light', 108 'full',
109 'account-blacklist-files', 109 'account-blacklist-files',
110 'thumbnails-blacklist', 110 'thumbnails-blacklist',
111 'blacklist-rights' 111 'blacklist-rights'
@@ -113,7 +113,7 @@ export class VideosModelGetQuerySubBuilder extends AbstractVideoQueryBuilder {
113 113
114 private static readonly thumbnailsInclude = new Set<GetType>([ 114 private static readonly thumbnailsInclude = new Set<GetType>([
115 'api', 115 'api',
116 'full-light', 116 'full',
117 'account-blacklist-files', 117 'account-blacklist-files',
118 'all-files', 118 'all-files',
119 'thumbnails', 119 'thumbnails',
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index 08adbced6..e5f8b5fa2 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -1352,10 +1352,10 @@ export class VideoModel extends Model<Partial<AttributesOnly<VideoModel>>> {
1352 return queryBuilder.queryVideo({ url, transaction, type: 'account-blacklist-files' }) 1352 return queryBuilder.queryVideo({ url, transaction, type: 'account-blacklist-files' })
1353 } 1353 }
1354 1354
1355 static loadAndPopulateAccountAndServerAndTags (id: number | string, t?: Transaction, userId?: number): Promise<MVideoFullLight> { 1355 static loadFull (id: number | string, t?: Transaction, userId?: number): Promise<MVideoFullLight> {
1356 const queryBuilder = new VideoModelGetQueryBuilder(VideoModel.sequelize) 1356 const queryBuilder = new VideoModelGetQueryBuilder(VideoModel.sequelize)
1357 1357
1358 return queryBuilder.queryVideo({ id, transaction: t, type: 'full-light', userId }) 1358 return queryBuilder.queryVideo({ id, transaction: t, type: 'full', userId })
1359 } 1359 }
1360 1360
1361 static loadForGetAPI (parameters: { 1361 static loadForGetAPI (parameters: {