diff options
author | Chocobozzz <me@florianbigard.com> | 2022-07-25 10:57:16 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-07-25 10:57:16 +0200 |
commit | 7b6b445d91d3f0bcbb526cb1e8c1f26b96f0a971 (patch) | |
tree | 1bc9724411941e0082243164d6cc53d02902b1f7 /server/lib/object-storage/videos.ts | |
parent | 4f50475c67356fb1fecd1de6d2551fdc5ad9a739 (diff) | |
download | PeerTube-7b6b445d91d3f0bcbb526cb1e8c1f26b96f0a971.tar.gz PeerTube-7b6b445d91d3f0bcbb526cb1e8c1f26b96f0a971.tar.zst PeerTube-7b6b445d91d3f0bcbb526cb1e8c1f26b96f0a971.zip |
Regenerate video filenames on transcoding
In particular when using manual transcoding, to invalidate potential
HTTP caches in front of peertube
Diffstat (limited to 'server/lib/object-storage/videos.ts')
-rw-r--r-- | server/lib/object-storage/videos.ts | 5 |
1 files changed, 5 insertions, 0 deletions
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) { | |||
26 | return removePrefix(generateHLSObjectBaseStorageKey(playlist), CONFIG.OBJECT_STORAGE.STREAMING_PLAYLISTS) | 26 | return removePrefix(generateHLSObjectBaseStorageKey(playlist), CONFIG.OBJECT_STORAGE.STREAMING_PLAYLISTS) |
27 | } | 27 | } |
28 | 28 | ||
29 | function removeHLSFileObjectStorage (playlist: MStreamingPlaylistVideo, filename: string) { | ||
30 | return removeObject(generateHLSObjectStorageKey(playlist, filename), CONFIG.OBJECT_STORAGE.STREAMING_PLAYLISTS) | ||
31 | } | ||
32 | |||
29 | function removeWebTorrentObjectStorage (videoFile: MVideoFile) { | 33 | function removeWebTorrentObjectStorage (videoFile: MVideoFile) { |
30 | return removeObject(generateWebTorrentObjectStorageKey(videoFile.filename), CONFIG.OBJECT_STORAGE.VIDEOS) | 34 | return removeObject(generateWebTorrentObjectStorageKey(videoFile.filename), CONFIG.OBJECT_STORAGE.VIDEOS) |
31 | } | 35 | } |
@@ -63,6 +67,7 @@ export { | |||
63 | storeHLSFile, | 67 | storeHLSFile, |
64 | 68 | ||
65 | removeHLSObjectStorage, | 69 | removeHLSObjectStorage, |
70 | removeHLSFileObjectStorage, | ||
66 | removeWebTorrentObjectStorage, | 71 | removeWebTorrentObjectStorage, |
67 | 72 | ||
68 | makeWebTorrentFileAvailable, | 73 | makeWebTorrentFileAvailable, |