From 1f6125be8b6306ba34b5ad9df985df462ef9759c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 18 Aug 2021 09:14:51 +0200 Subject: Optimize torrent URL update --- server/lib/job-queue/handlers/move-to-object-storage.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/lib') diff --git a/server/lib/job-queue/handlers/move-to-object-storage.ts b/server/lib/job-queue/handlers/move-to-object-storage.ts index a0c58d211..f3b8726eb 100644 --- a/server/lib/job-queue/handlers/move-to-object-storage.ts +++ b/server/lib/job-queue/handlers/move-to-object-storage.ts @@ -2,7 +2,7 @@ import * as Bull from 'bull' import { remove } from 'fs-extra' import { join } from 'path' import { logger } from '@server/helpers/logger' -import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent' +import { updateTorrentUrls } from '@server/helpers/webtorrent' import { CONFIG } from '@server/initializers/config' import { storeHLSFile, storeWebTorrentFile } from '@server/lib/object-storage' import { getHLSDirectory, getHlsResolutionPlaylistFilename } from '@server/lib/paths' @@ -106,7 +106,7 @@ async function onFileMoved (options: { file.fileUrl = fileUrl file.storage = VideoStorage.OBJECT_STORAGE - await createTorrentAndSetInfoHash(videoOrPlaylist, file) + await updateTorrentUrls(videoOrPlaylist, file) await file.save() logger.debug('Removing %s because it\'s now on object storage', oldPath) -- cgit v1.2.3