diff options
author | Chocobozzz <me@florianbigard.com> | 2023-05-10 11:16:05 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-05-10 11:16:05 +0200 |
commit | 34023e12534f22f28d0b5afc1db3fdf2fd1e7e60 (patch) | |
tree | 29b219412b79231ac7a62e482982bf1a9a7aada8 /server/lib/object-storage/videos.ts | |
parent | f9eee54f2a601b8db7ebb7c11d149b39170e6d68 (diff) | |
download | PeerTube-34023e12534f22f28d0b5afc1db3fdf2fd1e7e60.tar.gz PeerTube-34023e12534f22f28d0b5afc1db3fdf2fd1e7e60.tar.zst PeerTube-34023e12534f22f28d0b5afc1db3fdf2fd1e7e60.zip |
Fix S3 live sync
Ensure TS chunks referenced in M3U8 playlist are already uploaded on S3
Diffstat (limited to 'server/lib/object-storage/videos.ts')
-rw-r--r-- | server/lib/object-storage/videos.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/server/lib/object-storage/videos.ts b/server/lib/object-storage/videos.ts index bfdef94fd..57d978e4c 100644 --- a/server/lib/object-storage/videos.ts +++ b/server/lib/object-storage/videos.ts | |||
@@ -42,6 +42,15 @@ function storeHLSFileFromPath (playlist: MStreamingPlaylistVideo, path: string) | |||
42 | }) | 42 | }) |
43 | } | 43 | } |
44 | 44 | ||
45 | function storeHLSFileFromContent (playlist: MStreamingPlaylistVideo, path: string, content: string) { | ||
46 | return storeObject({ | ||
47 | inputPath: path, | ||
48 | objectStorageKey: generateHLSObjectStorageKey(playlist, basename(path)), | ||
49 | bucketInfo: CONFIG.OBJECT_STORAGE.STREAMING_PLAYLISTS, | ||
50 | isPrivate: playlist.Video.hasPrivateStaticPath() | ||
51 | }) | ||
52 | } | ||
53 | |||
45 | // --------------------------------------------------------------------------- | 54 | // --------------------------------------------------------------------------- |
46 | 55 | ||
47 | function storeWebTorrentFile (video: MVideo, file: MVideoFile) { | 56 | function storeWebTorrentFile (video: MVideo, file: MVideoFile) { |
@@ -166,6 +175,7 @@ export { | |||
166 | storeWebTorrentFile, | 175 | storeWebTorrentFile, |
167 | storeHLSFileFromFilename, | 176 | storeHLSFileFromFilename, |
168 | storeHLSFileFromPath, | 177 | storeHLSFileFromPath, |
178 | storeHLSFileFromContent, | ||
169 | 179 | ||
170 | updateWebTorrentFileACL, | 180 | updateWebTorrentFileACL, |
171 | updateHLSFilesACL, | 181 | updateHLSFilesACL, |