From 54db8e3d5c09fedc82d8421529c81255760a5ac2 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 30 Dec 2022 15:05:14 +0100 Subject: Fix P2P with object storage --- server/lib/live/live-manager.ts | 4 ++-- server/lib/live/shared/muxing-session.ts | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'server/lib/live') diff --git a/server/lib/live/live-manager.ts b/server/lib/live/live-manager.ts index 5e459f3c3..9ea983119 100644 --- a/server/lib/live/live-manager.ts +++ b/server/lib/live/live-manager.ts @@ -483,12 +483,12 @@ class LiveManager { playlist.p2pMediaLoaderPeerVersion = P2P_MEDIA_LOADER_PEER_VERSION playlist.type = VideoStreamingPlaylistType.HLS - playlist.assignP2PMediaLoaderInfoHashes(video, allResolutions) - playlist.storage = CONFIG.OBJECT_STORAGE.ENABLED ? VideoStorage.OBJECT_STORAGE : VideoStorage.FILE_SYSTEM + playlist.assignP2PMediaLoaderInfoHashes(video, allResolutions) + return playlist.save() } diff --git a/server/lib/live/shared/muxing-session.ts b/server/lib/live/shared/muxing-session.ts index 6ec126955..25ecf1c64 100644 --- a/server/lib/live/shared/muxing-session.ts +++ b/server/lib/live/shared/muxing-session.ts @@ -262,6 +262,8 @@ class MuxingSession extends EventEmitter { const url = await storeHLSFileFromFilename(this.streamingPlaylist, this.streamingPlaylist.playlistFilename) this.streamingPlaylist.playlistUrl = url + this.streamingPlaylist.assignP2PMediaLoaderInfoHashes(this.videoLive.Video, this.allResolutions) + await this.streamingPlaylist.save() } catch (err) { logger.error('Cannot upload live master file to object storage.', { err, ...this.lTags() }) -- cgit v1.2.3