1
0
Fork 0
peertube/server/lib/object-storage/keys.ts
Chocobozzz 66a7fc9473
Remove optimize old videos script
It is not compatible with HLS and I don't have time to maintain it
2021-08-17 10:33:36 +02:00

20 lines
631 B
TypeScript

import { join } from 'path'
import { MStreamingPlaylist, MVideoUUID } from '@server/types/models'
function generateHLSObjectStorageKey (playlist: MStreamingPlaylist, video: MVideoUUID, filename: string) {
return join(generateHLSObjectBaseStorageKey(playlist, video), filename)
}
function generateHLSObjectBaseStorageKey (playlist: MStreamingPlaylist, video: MVideoUUID) {
return join(playlist.getStringType(), video.uuid)
}
function generateWebTorrentObjectStorageKey (filename: string) {
return filename
}
export {
generateHLSObjectStorageKey,
generateHLSObjectBaseStorageKey,
generateWebTorrentObjectStorageKey
}