From 7b6b445d91d3f0bcbb526cb1e8c1f26b96f0a971 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 25 Jul 2022 10:57:16 +0200 Subject: Regenerate video filenames on transcoding In particular when using manual transcoding, to invalidate potential HTTP caches in front of peertube --- server/lib/object-storage/videos.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'server/lib/object-storage/videos.ts') diff --git a/server/lib/object-storage/videos.ts b/server/lib/object-storage/videos.ts index 066b48ab0..66e738200 100644 --- a/server/lib/object-storage/videos.ts +++ b/server/lib/object-storage/videos.ts @@ -26,6 +26,10 @@ function removeHLSObjectStorage (playlist: MStreamingPlaylistVideo) { return removePrefix(generateHLSObjectBaseStorageKey(playlist), CONFIG.OBJECT_STORAGE.STREAMING_PLAYLISTS) } +function removeHLSFileObjectStorage (playlist: MStreamingPlaylistVideo, filename: string) { + return removeObject(generateHLSObjectStorageKey(playlist, filename), CONFIG.OBJECT_STORAGE.STREAMING_PLAYLISTS) +} + function removeWebTorrentObjectStorage (videoFile: MVideoFile) { return removeObject(generateWebTorrentObjectStorageKey(videoFile.filename), CONFIG.OBJECT_STORAGE.VIDEOS) } @@ -63,6 +67,7 @@ export { storeHLSFile, removeHLSObjectStorage, + removeHLSFileObjectStorage, removeWebTorrentObjectStorage, makeWebTorrentFileAvailable, -- cgit v1.2.3