]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/video-channel.ts
Ensure we don't run transcoding after import file
[github/Chocobozzz/PeerTube.git] / server / models / video / video-channel.ts
index a151ad61ca389d1ab3dd0a486a6a1b22eade13aa..b652d8531aab6a60a9dfe1379827e0e040346c37 100644 (file)
@@ -26,7 +26,7 @@ import {
   isVideoChannelDisplayNameValid,
   isVideoChannelSupportValid
 } from '../../helpers/custom-validators/video-channels'
-import { CONSTRAINTS_FIELDS, VIDEO_CHANNELS, WEBSERVER } from '../../initializers/constants'
+import { CONSTRAINTS_FIELDS, WEBSERVER } from '../../initializers/constants'
 import { sendDeleteActor } from '../../lib/activitypub/send'
 import {
   MChannelActor,
@@ -44,6 +44,7 @@ import { setAsUpdated } from '../shared'
 import { buildServerIdsFollowedBy, buildTrigramSearchIndex, createSimilarityAttribute, getSort, throwIfNotValid } from '../utils'
 import { VideoModel } from './video'
 import { VideoPlaylistModel } from './video-playlist'
+import { CONFIG } from '@server/initializers/config'
 
 export enum ScopeNames {
   FOR_API = 'FOR_API',
@@ -582,10 +583,9 @@ ON              "Account->Actor"."serverId" = "Account->Actor->Server"."id"`
       })
   }
 
-
   static listAllByAccount (accountId: number) {
     const query = {
-      limit: VIDEO_CHANNELS.MAX_PER_USER,
+      limit: CONFIG.VIDEO_CHANNELS.MAX_PER_USER,
       include: [
         {
           attributes: [],
@@ -601,7 +601,6 @@ ON              "Account->Actor"."serverId" = "Account->Actor->Server"."id"`
     return VideoChannelModel.findAll(query)
   }
 
-
   static loadAndPopulateAccount (id: number, transaction?: Transaction): Promise<MChannelBannerAccountDefault> {
     return VideoChannelModel.unscoped()
       .scope([ ScopeNames.WITH_ACTOR_BANNER, ScopeNames.WITH_ACCOUNT ])