mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 10:19:35 +02:00
20 lines
594 B
TypeScript
20 lines
594 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 generateWebVideoObjectStorageKey (filename: string) {
|
|
return filename
|
|
}
|
|
|
|
export {
|
|
generateHLSObjectStorageKey,
|
|
generateHLSObjectBaseStorageKey,
|
|
generateWebVideoObjectStorageKey
|
|
}
|