diff options
Diffstat (limited to 'server/controllers/api/videos/upload.ts')
-rw-r--r-- | server/controllers/api/videos/upload.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/api/videos/upload.ts b/server/controllers/api/videos/upload.ts index 3ce66c9ca..4a9d7b619 100644 --- a/server/controllers/api/videos/upload.ts +++ b/server/controllers/api/videos/upload.ts | |||
@@ -17,6 +17,7 @@ import { | |||
17 | import { VideoPathManager } from '@server/lib/video-path-manager' | 17 | import { VideoPathManager } from '@server/lib/video-path-manager' |
18 | import { buildNextVideoState } from '@server/lib/video-state' | 18 | import { buildNextVideoState } from '@server/lib/video-state' |
19 | import { openapiOperationDoc } from '@server/middlewares/doc' | 19 | import { openapiOperationDoc } from '@server/middlewares/doc' |
20 | import { VideoSourceModel } from '@server/models/video/video-source' | ||
20 | import { MVideoFile, MVideoFullLight } from '@server/types/models' | 21 | import { MVideoFile, MVideoFullLight } from '@server/types/models' |
21 | import { getLowercaseExtension } from '@shared/core-utils' | 22 | import { getLowercaseExtension } from '@shared/core-utils' |
22 | import { isAudioFile, uuidToShort } from '@shared/extra-utils' | 23 | import { isAudioFile, uuidToShort } from '@shared/extra-utils' |
@@ -44,7 +45,6 @@ import { | |||
44 | import { ScheduleVideoUpdateModel } from '../../../models/video/schedule-video-update' | 45 | import { ScheduleVideoUpdateModel } from '../../../models/video/schedule-video-update' |
45 | import { VideoModel } from '../../../models/video/video' | 46 | import { VideoModel } from '../../../models/video/video' |
46 | import { VideoFileModel } from '../../../models/video/video-file' | 47 | import { VideoFileModel } from '../../../models/video/video-file' |
47 | import { VideoSourceModel } from '@server/models/video/video-source' | ||
48 | 48 | ||
49 | const lTags = loggerTagsFactory('api', 'video') | 49 | const lTags = loggerTagsFactory('api', 'video') |
50 | const auditLogger = auditLoggerFactory('videos') | 50 | const auditLogger = auditLoggerFactory('videos') |
@@ -270,7 +270,7 @@ async function createTorrentFederate (video: MVideoFullLight, videoFile: MVideoF | |||
270 | const payload: ManageVideoTorrentPayload = { videoId: video.id, videoFileId: videoFile.id, action: 'create' } | 270 | const payload: ManageVideoTorrentPayload = { videoId: video.id, videoFileId: videoFile.id, action: 'create' } |
271 | 271 | ||
272 | const job = await JobQueue.Instance.createJobWithPromise({ type: 'manage-video-torrent', payload }) | 272 | const job = await JobQueue.Instance.createJobWithPromise({ type: 'manage-video-torrent', payload }) |
273 | await job.finished() | 273 | await JobQueue.Instance.waitJob(job) |
274 | 274 | ||
275 | const refreshedVideo = await VideoModel.loadFull(video.id) | 275 | const refreshedVideo = await VideoModel.loadFull(video.id) |
276 | if (!refreshedVideo) return | 276 | if (!refreshedVideo) return |