diff options
Diffstat (limited to 'server/lib/job-queue/handlers/video-file-import.ts')
-rw-r--r-- | server/lib/job-queue/handlers/video-file-import.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/server/lib/job-queue/handlers/video-file-import.ts b/server/lib/job-queue/handlers/video-file-import.ts index 0d9e80cb8..6b2d60317 100644 --- a/server/lib/job-queue/handlers/video-file-import.ts +++ b/server/lib/job-queue/handlers/video-file-import.ts | |||
@@ -1,18 +1,18 @@ | |||
1 | import { Job } from 'bull' | 1 | import { Job } from 'bull' |
2 | import { copy, stat } from 'fs-extra' | 2 | import { copy, stat } from 'fs-extra' |
3 | import { getLowercaseExtension } from '@shared/core-utils' | ||
4 | import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent' | 3 | import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent' |
5 | import { CONFIG } from '@server/initializers/config' | 4 | import { CONFIG } from '@server/initializers/config' |
6 | import { federateVideoIfNeeded } from '@server/lib/activitypub/videos' | 5 | import { federateVideoIfNeeded } from '@server/lib/activitypub/videos' |
7 | import { generateWebTorrentVideoFilename } from '@server/lib/paths' | 6 | import { generateWebTorrentVideoFilename } from '@server/lib/paths' |
8 | import { addMoveToObjectStorageJob } from '@server/lib/video' | 7 | import { addMoveToObjectStorageJob } from '@server/lib/video' |
9 | import { VideoPathManager } from '@server/lib/video-path-manager' | 8 | import { VideoPathManager } from '@server/lib/video-path-manager' |
9 | import { VideoModel } from '@server/models/video/video' | ||
10 | import { VideoFileModel } from '@server/models/video/video-file' | ||
10 | import { MVideoFullLight } from '@server/types/models' | 11 | import { MVideoFullLight } from '@server/types/models' |
12 | import { getLowercaseExtension } from '@shared/core-utils' | ||
11 | import { VideoFileImportPayload, VideoStorage } from '@shared/models' | 13 | import { VideoFileImportPayload, VideoStorage } from '@shared/models' |
12 | import { getVideoFileFPS, getVideoFileResolution } from '../../../helpers/ffprobe-utils' | 14 | import { getVideoStreamFPS, getVideoStreamDimensionsInfo } from '../../../helpers/ffmpeg' |
13 | import { logger } from '../../../helpers/logger' | 15 | import { logger } from '../../../helpers/logger' |
14 | import { VideoModel } from '../../../models/video/video' | ||
15 | import { VideoFileModel } from '../../../models/video/video-file' | ||
16 | 16 | ||
17 | async function processVideoFileImport (job: Job) { | 17 | async function processVideoFileImport (job: Job) { |
18 | const payload = job.data as VideoFileImportPayload | 18 | const payload = job.data as VideoFileImportPayload |
@@ -45,9 +45,9 @@ export { | |||
45 | // --------------------------------------------------------------------------- | 45 | // --------------------------------------------------------------------------- |
46 | 46 | ||
47 | async function updateVideoFile (video: MVideoFullLight, inputFilePath: string) { | 47 | async function updateVideoFile (video: MVideoFullLight, inputFilePath: string) { |
48 | const { resolution } = await getVideoFileResolution(inputFilePath) | 48 | const { resolution } = await getVideoStreamDimensionsInfo(inputFilePath) |
49 | const { size } = await stat(inputFilePath) | 49 | const { size } = await stat(inputFilePath) |
50 | const fps = await getVideoFileFPS(inputFilePath) | 50 | const fps = await getVideoStreamFPS(inputFilePath) |
51 | 51 | ||
52 | const fileExt = getLowercaseExtension(inputFilePath) | 52 | const fileExt = getLowercaseExtension(inputFilePath) |
53 | 53 | ||