- inputPath: join(CONFIG.STORAGE.VIDEOS_DIR, filename),
- objectStorageKey: generateWebTorrentObjectStorageKey(filename),
- bucketInfo: CONFIG.OBJECT_STORAGE.VIDEOS
+ inputPath: VideoPathManager.Instance.getFSVideoFileOutputPath(video, file),
+ objectStorageKey: generateWebTorrentObjectStorageKey(file.filename),
+ bucketInfo: CONFIG.OBJECT_STORAGE.VIDEOS,
+ isPrivate: video.hasPrivateStaticPath()
+ })
+}
+
+// ---------------------------------------------------------------------------
+
+async function updateWebTorrentFileACL (video: MVideo, file: MVideoFile) {
+ await updateObjectACL({
+ objectStorageKey: generateWebTorrentObjectStorageKey(file.filename),
+ bucketInfo: CONFIG.OBJECT_STORAGE.VIDEOS,
+ isPrivate: video.hasPrivateStaticPath()
+ })
+}
+
+async function updateHLSFilesACL (playlist: MStreamingPlaylistVideo) {
+ await updatePrefixACL({
+ prefix: generateHLSObjectBaseStorageKey(playlist),
+ bucketInfo: CONFIG.OBJECT_STORAGE.STREAMING_PLAYLISTS,
+ isPrivate: playlist.Video.hasPrivateStaticPath()