aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/job-queue
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/job-queue')
-rw-r--r--server/lib/job-queue/handlers/video-import.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/lib/job-queue/handlers/video-import.ts b/server/lib/job-queue/handlers/video-import.ts
index 9b5f2bb2b..9210aec54 100644
--- a/server/lib/job-queue/handlers/video-import.ts
+++ b/server/lib/job-queue/handlers/video-import.ts
@@ -4,6 +4,7 @@ import { extname } from 'path'
4import { addOptimizeOrMergeAudioJob } from '@server/helpers/video' 4import { addOptimizeOrMergeAudioJob } from '@server/helpers/video'
5import { isPostImportVideoAccepted } from '@server/lib/moderation' 5import { isPostImportVideoAccepted } from '@server/lib/moderation'
6import { Hooks } from '@server/lib/plugins/hooks' 6import { Hooks } from '@server/lib/plugins/hooks'
7import { isAbleToUploadVideo } from '@server/lib/user'
7import { getVideoFilePath } from '@server/lib/video-paths' 8import { getVideoFilePath } from '@server/lib/video-paths'
8import { MVideoImportDefault, MVideoImportDefaultFiles, MVideoImportVideo } from '@server/types/models/video/video-import' 9import { MVideoImportDefault, MVideoImportDefaultFiles, MVideoImportVideo } from '@server/types/models/video/video-import'
9import { 10import {
@@ -108,7 +109,7 @@ async function processFile (downloader: () => Promise<string>, videoImport: MVid
108 109
109 // Get information about this video 110 // Get information about this video
110 const stats = await stat(tempVideoPath) 111 const stats = await stat(tempVideoPath)
111 const isAble = await videoImport.User.isAbleToUploadVideo({ size: stats.size }) 112 const isAble = await isAbleToUploadVideo(videoImport.User.id, stats.size)
112 if (isAble === false) { 113 if (isAble === false) {
113 throw new Error('The user video quota is exceeded with this video to import.') 114 throw new Error('The user video quota is exceeded with this video to import.')
114 } 115 }