diff options
author | Chocobozzz <me@florianbigard.com> | 2021-12-08 11:07:19 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-12-08 11:07:19 +0100 |
commit | 9b293cd6a2ce9ed1e1ccd41adbf7f2dbe2da8231 (patch) | |
tree | 3419e23d551937f716612f93747f58f2d381d310 /server/lib/job-queue/handlers | |
parent | a23f6c94edee1cb11875585a64dc61f1004c1792 (diff) | |
download | PeerTube-9b293cd6a2ce9ed1e1ccd41adbf7f2dbe2da8231.tar.gz PeerTube-9b293cd6a2ce9ed1e1ccd41adbf7f2dbe2da8231.tar.zst PeerTube-9b293cd6a2ce9ed1e1ccd41adbf7f2dbe2da8231.zip |
Update torrent metadata on video update
Diffstat (limited to 'server/lib/job-queue/handlers')
-rw-r--r-- | server/lib/job-queue/handlers/move-to-object-storage.ts | 4 |
1 files changed, 2 insertions, 2 deletions
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 54a7c566b..b5eea0184 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 { Job } from 'bull' | |||
2 | import { remove } from 'fs-extra' | 2 | import { remove } from 'fs-extra' |
3 | import { join } from 'path' | 3 | import { join } from 'path' |
4 | import { logger } from '@server/helpers/logger' | 4 | import { logger } from '@server/helpers/logger' |
5 | import { updateTorrentUrls } from '@server/helpers/webtorrent' | 5 | import { updateTorrentMetadata } from '@server/helpers/webtorrent' |
6 | import { CONFIG } from '@server/initializers/config' | 6 | import { CONFIG } from '@server/initializers/config' |
7 | import { P2P_MEDIA_LOADER_PEER_VERSION } from '@server/initializers/constants' | 7 | import { P2P_MEDIA_LOADER_PEER_VERSION } from '@server/initializers/constants' |
8 | import { storeHLSFile, storeWebTorrentFile } from '@server/lib/object-storage' | 8 | import { storeHLSFile, storeWebTorrentFile } from '@server/lib/object-storage' |
@@ -113,7 +113,7 @@ async function onFileMoved (options: { | |||
113 | file.fileUrl = fileUrl | 113 | file.fileUrl = fileUrl |
114 | file.storage = VideoStorage.OBJECT_STORAGE | 114 | file.storage = VideoStorage.OBJECT_STORAGE |
115 | 115 | ||
116 | await updateTorrentUrls(videoOrPlaylist, file) | 116 | await updateTorrentMetadata(videoOrPlaylist, file) |
117 | await file.save() | 117 | await file.save() |
118 | 118 | ||
119 | logger.debug('Removing %s because it\'s now on object storage', oldPath) | 119 | logger.debug('Removing %s because it\'s now on object storage', oldPath) |