diff options
author | Chocobozzz <me@florianbigard.com> | 2021-09-07 15:16:26 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-09-07 15:16:26 +0200 |
commit | fb72d2e1c24cd4660fd6611ef723c5827c47294c (patch) | |
tree | c2a2991a9e6944cd3d22c87e34de096a47b8db9e /server/lib | |
parent | 6f9719b568fad75959a1404b6927b7a278061c41 (diff) | |
download | PeerTube-fb72d2e1c24cd4660fd6611ef723c5827c47294c.tar.gz PeerTube-fb72d2e1c24cd4660fd6611ef723c5827c47294c.tar.zst PeerTube-fb72d2e1c24cd4660fd6611ef723c5827c47294c.zip |
Fix infohash with object storage
Diffstat (limited to 'server/lib')
-rw-r--r-- | server/lib/job-queue/handlers/move-to-object-storage.ts | 4 |
1 files changed, 4 insertions, 0 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 0bebc0fc2..4beca3d75 100644 --- a/server/lib/job-queue/handlers/move-to-object-storage.ts +++ b/server/lib/job-queue/handlers/move-to-object-storage.ts | |||
@@ -4,6 +4,7 @@ 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 { updateTorrentUrls } 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 { storeHLSFile, storeWebTorrentFile } from '@server/lib/object-storage' | 8 | import { storeHLSFile, storeWebTorrentFile } from '@server/lib/object-storage' |
8 | import { getHLSDirectory, getHlsResolutionPlaylistFilename } from '@server/lib/paths' | 9 | import { getHLSDirectory, getHlsResolutionPlaylistFilename } from '@server/lib/paths' |
9 | import { moveToNextState } from '@server/lib/video-state' | 10 | import { moveToNextState } from '@server/lib/video-state' |
@@ -84,6 +85,9 @@ async function doAfterLastJob (video: MVideoWithAllFiles, isNewVideo: boolean) { | |||
84 | 85 | ||
85 | playlist.storage = VideoStorage.OBJECT_STORAGE | 86 | playlist.storage = VideoStorage.OBJECT_STORAGE |
86 | 87 | ||
88 | playlist.assignP2PMediaLoaderInfoHashes(video, playlist.VideoFiles) | ||
89 | playlist.p2pMediaLoaderPeerVersion = P2P_MEDIA_LOADER_PEER_VERSION | ||
90 | |||
87 | await playlist.save() | 91 | await playlist.save() |
88 | } | 92 | } |
89 | 93 | ||