aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/job-queue/handlers
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/job-queue/handlers')
-rw-r--r--server/lib/job-queue/handlers/video-import.ts9
-rw-r--r--server/lib/job-queue/handlers/video-transcoding.ts2
2 files changed, 8 insertions, 3 deletions
diff --git a/server/lib/job-queue/handlers/video-import.ts b/server/lib/job-queue/handlers/video-import.ts
index 40804e82e..4cde26aef 100644
--- a/server/lib/job-queue/handlers/video-import.ts
+++ b/server/lib/job-queue/handlers/video-import.ts
@@ -2,6 +2,7 @@ import { Job } from 'bull'
2import { move, remove, stat } from 'fs-extra' 2import { move, remove, stat } from 'fs-extra'
3import { retryTransactionWrapper } from '@server/helpers/database-utils' 3import { retryTransactionWrapper } from '@server/helpers/database-utils'
4import { YoutubeDLWrapper } from '@server/helpers/youtube-dl' 4import { YoutubeDLWrapper } from '@server/helpers/youtube-dl'
5import { CONFIG } from '@server/initializers/config'
5import { isPostImportVideoAccepted } from '@server/lib/moderation' 6import { isPostImportVideoAccepted } from '@server/lib/moderation'
6import { generateWebTorrentVideoFilename } from '@server/lib/paths' 7import { generateWebTorrentVideoFilename } from '@server/lib/paths'
7import { Hooks } from '@server/lib/plugins/hooks' 8import { Hooks } from '@server/lib/plugins/hooks'
@@ -25,7 +26,7 @@ import {
25 VideoResolution, 26 VideoResolution,
26 VideoState 27 VideoState
27} from '@shared/models' 28} from '@shared/models'
28import { ffprobePromise, getVideoStreamDuration, getVideoStreamFPS, getVideoStreamDimensionsInfo } from '../../../helpers/ffmpeg' 29import { ffprobePromise, getVideoStreamDimensionsInfo, getVideoStreamDuration, getVideoStreamFPS } from '../../../helpers/ffmpeg'
29import { logger } from '../../../helpers/logger' 30import { logger } from '../../../helpers/logger'
30import { getSecureTorrentName } from '../../../helpers/utils' 31import { getSecureTorrentName } from '../../../helpers/utils'
31import { createTorrentAndSetInfoHash, downloadWebTorrentVideo } from '../../../helpers/webtorrent' 32import { createTorrentAndSetInfoHash, downloadWebTorrentVideo } from '../../../helpers/webtorrent'
@@ -80,7 +81,11 @@ async function processYoutubeDLImport (job: Job, videoImport: MVideoImportDefaul
80 81
81 const options = { type: payload.type, videoImportId: videoImport.id } 82 const options = { type: payload.type, videoImportId: videoImport.id }
82 83
83 const youtubeDL = new YoutubeDLWrapper(videoImport.targetUrl, ServerConfigManager.Instance.getEnabledResolutions('vod')) 84 const youtubeDL = new YoutubeDLWrapper(
85 videoImport.targetUrl,
86 ServerConfigManager.Instance.getEnabledResolutions('vod'),
87 CONFIG.TRANSCODING.ALWAYS_TRANSCODE_ORIGINAL_RESOLUTION
88 )
84 89
85 return processFile( 90 return processFile(
86 () => youtubeDL.downloadVideo(payload.fileExt, JOB_TTL['video-import']), 91 () => youtubeDL.downloadVideo(payload.fileExt, JOB_TTL['video-import']),
diff --git a/server/lib/job-queue/handlers/video-transcoding.ts b/server/lib/job-queue/handlers/video-transcoding.ts
index 890d34e3b..4e5e97919 100644
--- a/server/lib/job-queue/handlers/video-transcoding.ts
+++ b/server/lib/job-queue/handlers/video-transcoding.ts
@@ -265,7 +265,7 @@ async function createLowerResolutionsJobs (options: {
265 265
266 // Create transcoding jobs if there are enabled resolutions 266 // Create transcoding jobs if there are enabled resolutions
267 const resolutionsEnabled = await Hooks.wrapObject( 267 const resolutionsEnabled = await Hooks.wrapObject(
268 computeResolutionsToTranscode({ inputResolution: videoFileResolution, type: 'vod', includeInputResolution: false }), 268 computeResolutionsToTranscode({ input: videoFileResolution, type: 'vod', includeInput: false, strictLower: true }),
269 'filter:transcoding.auto.resolutions-to-transcode.result', 269 'filter:transcoding.auto.resolutions-to-transcode.result',
270 options 270 options
271 ) 271 )