aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib')
-rw-r--r--server/lib/job-queue/handlers/manage-video-torrent.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/server/lib/job-queue/handlers/manage-video-torrent.ts b/server/lib/job-queue/handlers/manage-video-torrent.ts
index 5cb4287e1..dfd4e6140 100644
--- a/server/lib/job-queue/handlers/manage-video-torrent.ts
+++ b/server/lib/job-queue/handlers/manage-video-torrent.ts
@@ -28,6 +28,8 @@ async function doCreateAction (payload: ManageVideoTorrentPayload & { action: 'c
28 loadFileOrLog(payload.videoFileId) 28 loadFileOrLog(payload.videoFileId)
29 ]) 29 ])
30 30
31 if (!video || !file) return
32
31 await createTorrentAndSetInfoHash(video, file) 33 await createTorrentAndSetInfoHash(video, file)
32 34
33 // Refresh videoFile because the createTorrentAndSetInfoHash could be long 35 // Refresh videoFile because the createTorrentAndSetInfoHash could be long
@@ -48,6 +50,8 @@ async function doUpdateMetadataAction (payload: ManageVideoTorrentPayload & { ac
48 loadFileOrLog(payload.videoFileId) 50 loadFileOrLog(payload.videoFileId)
49 ]) 51 ])
50 52
53 if ((!video && !streamingPlaylist) || !file) return
54
51 await updateTorrentMetadata(video || streamingPlaylist, file) 55 await updateTorrentMetadata(video || streamingPlaylist, file)
52 56
53 await file.save() 57 await file.save()