@@ -6,7 +6,7 @@ import { VideoImportState } from '../../../../shared/models/videos'
66import { getDurationFromVideoFile , getVideoFileFPS , getVideoFileResolution } from '../../../helpers/ffmpeg-utils'
77import { extname , join } from 'path'
88import { VideoFileModel } from '../../../models/video/video-file'
9- import { CONFIG , sequelizeTypescript } from '../../../initializers'
9+ import { CONFIG , sequelizeTypescript , VIDEO_IMPORT_TIMEOUT } from '../../../initializers'
1010import { doRequestAndSaveToFile } from '../../../helpers/requests'
1111import { VideoState } from '../../../../shared'
1212import { JobQueue } from '../index'
@@ -65,7 +65,7 @@ async function processTorrentImport (job: Bull.Job, payload: VideoImportTorrentP
6565 torrentName : videoImport . torrentName ? getSecureTorrentName ( videoImport . torrentName ) : undefined ,
6666 magnetUri : videoImport . magnetUri
6767 }
68- return processFile ( ( ) => downloadWebTorrentVideo ( target ) , videoImport , options )
68+ return processFile ( ( ) => downloadWebTorrentVideo ( target , VIDEO_IMPORT_TIMEOUT ) , videoImport , options )
6969}
7070
7171async function processYoutubeDLImport ( job : Bull . Job , payload : VideoImportYoutubeDLPayload ) {
@@ -83,7 +83,7 @@ async function processYoutubeDLImport (job: Bull.Job, payload: VideoImportYoutub
8383 generatePreview : false
8484 }
8585
86- return processFile ( ( ) => downloadYoutubeDLVideo ( videoImport . targetUrl ) , videoImport , options )
86+ return processFile ( ( ) => downloadYoutubeDLVideo ( videoImport . targetUrl , VIDEO_IMPORT_TIMEOUT ) , videoImport , options )
8787}
8888
8989async function getVideoImportOrDie ( videoImportId : number ) {
0 commit comments