mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-12-01 21:09:17 -06:00
21 lines
598 B
TypeScript
21 lines
598 B
TypeScript
import { join } from 'path'
|
|
import { MStreamingPlaylistVideo } from '@server/types/models'
|
|
|
|
function generateHLSObjectStorageKey (playlist: MStreamingPlaylistVideo, filename: string) {
|
|
return join(generateHLSObjectBaseStorageKey(playlist), filename)
|
|
}
|
|
|
|
function generateHLSObjectBaseStorageKey (playlist: MStreamingPlaylistVideo) {
|
|
return join(playlist.getStringType(), playlist.Video.uuid)
|
|
}
|
|
|
|
function generateWebTorrentObjectStorageKey (filename: string) {
|
|
return filename
|
|
}
|
|
|
|
export {
|
|
generateHLSObjectStorageKey,
|
|
generateHLSObjectBaseStorageKey,
|
|
generateWebTorrentObjectStorageKey
|
|
}
|