]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/sql/video/video-model-get-query-builder.ts
Feature/Add replay privacy (#5692)
[github/Chocobozzz/PeerTube.git] / server / models / video / sql / video / video-model-get-query-builder.ts
index 32e5c4ff70bad988a51be9b9ac59980e26498fe6..8e90ff6411aa97d8c3114d10450dfc59fb586388 100644 (file)
@@ -1,5 +1,5 @@
-import { pick } from 'lodash'
 import { Sequelize, Transaction } from 'sequelize'
+import { pick } from '@shared/core-utils'
 import { AbstractVideoQueryBuilder } from './shared/abstract-video-query-builder'
 import { VideoFileQueryBuilder } from './shared/video-file-query-builder'
 import { VideoModelBuilder } from './shared/video-model-builder'
@@ -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<GetType>([ 'api', 'full-light', 'account-blacklist-files', 'all-files' ])
+  private static readonly videoFilesInclude = new Set<GetType>([ '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<GetType>([ 'api' ])
-  private static readonly liveInclude = new Set<GetType>([ 'api', 'full-light' ])
-  private static readonly scheduleUpdateInclude = new Set<GetType>([ 'api', 'full-light' ])
-  private static readonly tagsInclude = new Set<GetType>([ 'api', 'full-light' ])
-  private static readonly userHistoryInclude = new Set<GetType>([ 'api', 'full-light' ])
-  private static readonly accountInclude = new Set<GetType>([ 'api', 'full-light', 'account-blacklist-files' ])
+  private static readonly liveInclude = new Set<GetType>([ 'api', 'full' ])
+  private static readonly scheduleUpdateInclude = new Set<GetType>([ 'api', 'full' ])
+  private static readonly tagsInclude = new Set<GetType>([ 'api', 'full' ])
+  private static readonly userHistoryInclude = new Set<GetType>([ 'api', 'full' ])
+  private static readonly accountInclude = new Set<GetType>([ 'api', 'full', 'account-blacklist-files' ])
   private static readonly ownerUserInclude = new Set<GetType>([ 'blacklist-rights' ])
 
   private static readonly blacklistedInclude = new Set<GetType>([
     '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<GetType>([
     'api',
-    'full-light',
+    'full',
     'account-blacklist-files',
     'all-files',
     'thumbnails',