From 4fae2b1f300c1f027629569817262f60873a663a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 28 Jun 2022 14:57:51 +0200 Subject: Rename video full loading --- .../video/sql/video/video-model-get-query-builder.ts | 18 +++++++++--------- server/models/video/video.ts | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'server/models') 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' export type GetType = 'api' | - 'full-light' | + 'full' | 'account-blacklist-files' | 'all-files' | 'thumbnails' | @@ -40,7 +40,7 @@ export class VideoModelGetQueryBuilder { private readonly videoModelBuilder: VideoModelBuilder - private static readonly videoFilesInclude = new Set([ 'api', 'full-light', 'account-blacklist-files', 'all-files' ]) + private static readonly videoFilesInclude = new Set([ 'api', 'full', 'account-blacklist-files', 'all-files' ]) constructor (protected readonly sequelize: Sequelize) { this.videoQueryBuilder = new VideosModelGetQuerySubBuilder(sequelize) @@ -96,16 +96,16 @@ export class VideosModelGetQuerySubBuilder extends AbstractVideoQueryBuilder { protected streamingPlaylistFilesQuery: string private static readonly trackersInclude = new Set([ 'api' ]) - private static readonly liveInclude = new Set([ 'api', 'full-light' ]) - private static readonly scheduleUpdateInclude = new Set([ 'api', 'full-light' ]) - private static readonly tagsInclude = new Set([ 'api', 'full-light' ]) - private static readonly userHistoryInclude = new Set([ 'api', 'full-light' ]) - private static readonly accountInclude = new Set([ 'api', 'full-light', 'account-blacklist-files' ]) + private static readonly liveInclude = new Set([ 'api', 'full' ]) + private static readonly scheduleUpdateInclude = new Set([ 'api', 'full' ]) + private static readonly tagsInclude = new Set([ 'api', 'full' ]) + private static readonly userHistoryInclude = new Set([ 'api', 'full' ]) + private static readonly accountInclude = new Set([ 'api', 'full', 'account-blacklist-files' ]) private static readonly ownerUserInclude = new Set([ 'blacklist-rights' ]) private static readonly blacklistedInclude = new Set([ 'api', - 'full-light', + 'full', 'account-blacklist-files', 'thumbnails-blacklist', 'blacklist-rights' @@ -113,7 +113,7 @@ export class VideosModelGetQuerySubBuilder extends AbstractVideoQueryBuilder { private static readonly thumbnailsInclude = new Set([ 'api', - 'full-light', + 'full', 'account-blacklist-files', 'all-files', '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>> { return queryBuilder.queryVideo({ url, transaction, type: 'account-blacklist-files' }) } - static loadAndPopulateAccountAndServerAndTags (id: number | string, t?: Transaction, userId?: number): Promise { + static loadFull (id: number | string, t?: Transaction, userId?: number): Promise { const queryBuilder = new VideoModelGetQueryBuilder(VideoModel.sequelize) - return queryBuilder.queryVideo({ id, transaction: t, type: 'full-light', userId }) + return queryBuilder.queryVideo({ id, transaction: t, type: 'full', userId }) } static loadForGetAPI (parameters: { -- cgit v1.2.3