1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 17:59:37 +02:00

Fix infohash with object storage

This commit is contained in:
Chocobozzz 2021-09-07 15:16:26 +02:00
parent 6f9719b568
commit fb72d2e1c2
No known key found for this signature in database
GPG key ID: 583A612D890159BE
5 changed files with 43 additions and 1 deletions

View file

@ -4,6 +4,7 @@ import { join } from 'path'
import { logger } from '@server/helpers/logger'
import { updateTorrentUrls } from '@server/helpers/webtorrent'
import { CONFIG } from '@server/initializers/config'
import { P2P_MEDIA_LOADER_PEER_VERSION } from '@server/initializers/constants'
import { storeHLSFile, storeWebTorrentFile } from '@server/lib/object-storage'
import { getHLSDirectory, getHlsResolutionPlaylistFilename } from '@server/lib/paths'
import { moveToNextState } from '@server/lib/video-state'
@ -84,6 +85,9 @@ async function doAfterLastJob (video: MVideoWithAllFiles, isNewVideo: boolean) {
playlist.storage = VideoStorage.OBJECT_STORAGE
playlist.assignP2PMediaLoaderInfoHashes(video, playlist.VideoFiles)
playlist.p2pMediaLoaderPeerVersion = P2P_MEDIA_LOADER_PEER_VERSION
await playlist.save()
}