aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/job-queue/handlers/video-file-import.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/job-queue/handlers/video-file-import.ts')
-rw-r--r--server/lib/job-queue/handlers/video-file-import.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/server/lib/job-queue/handlers/video-file-import.ts b/server/lib/job-queue/handlers/video-file-import.ts
index 4d199f247..2f4abf730 100644
--- a/server/lib/job-queue/handlers/video-file-import.ts
+++ b/server/lib/job-queue/handlers/video-file-import.ts
@@ -32,7 +32,7 @@ async function processVideoFileImport (job: Bull.Job) {
32 const newResolutionPayload = { 32 const newResolutionPayload = {
33 type: 'new-resolution-to-webtorrent' as 'new-resolution-to-webtorrent', 33 type: 'new-resolution-to-webtorrent' as 'new-resolution-to-webtorrent',
34 videoUUID: video.uuid, 34 videoUUID: video.uuid,
35 resolution: data.videoFileResolution, 35 resolution: data.resolution,
36 isPortraitMode: data.isPortraitMode, 36 isPortraitMode: data.isPortraitMode,
37 copyCodecs: false, 37 copyCodecs: false,
38 isNewVideo: false 38 isNewVideo: false
@@ -51,13 +51,13 @@ export {
51// --------------------------------------------------------------------------- 51// ---------------------------------------------------------------------------
52 52
53async function updateVideoFile (video: MVideoFullLight, inputFilePath: string) { 53async function updateVideoFile (video: MVideoFullLight, inputFilePath: string) {
54 const { videoFileResolution } = await getVideoFileResolution(inputFilePath) 54 const { resolution } = await getVideoFileResolution(inputFilePath)
55 const { size } = await stat(inputFilePath) 55 const { size } = await stat(inputFilePath)
56 const fps = await getVideoFileFPS(inputFilePath) 56 const fps = await getVideoFileFPS(inputFilePath)
57 57
58 const fileExt = getLowercaseExtension(inputFilePath) 58 const fileExt = getLowercaseExtension(inputFilePath)
59 59
60 const currentVideoFile = video.VideoFiles.find(videoFile => videoFile.resolution === videoFileResolution) 60 const currentVideoFile = video.VideoFiles.find(videoFile => videoFile.resolution === resolution)
61 61
62 if (currentVideoFile) { 62 if (currentVideoFile) {
63 // Remove old file and old torrent 63 // Remove old file and old torrent
@@ -69,9 +69,9 @@ async function updateVideoFile (video: MVideoFullLight, inputFilePath: string) {
69 } 69 }
70 70
71 const newVideoFile = new VideoFileModel({ 71 const newVideoFile = new VideoFileModel({
72 resolution: videoFileResolution, 72 resolution,
73 extname: fileExt, 73 extname: fileExt,
74 filename: generateWebTorrentVideoFilename(videoFileResolution, fileExt), 74 filename: generateWebTorrentVideoFilename(resolution, fileExt),
75 size, 75 size,
76 fps, 76 fps,
77 videoId: video.id 77 videoId: video.id