mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 17:59:37 +02:00

* testing not removing old file and adding columb to db * implement feature * remove unnecessary config changes * use only keptOriginalFileName, change keptOriginalFileName to keptOriginalFilename for consistency with with videoFile table, slight refactor with basename() * save original video files to dedicated directory original-video-files * begin implementing object storage (bucket) support --------- Co-authored-by: chagai.friedlander <chagai.friedlander@fairkom.eu> Co-authored-by: Ian <ian.kraft@hotmail.com> Co-authored-by: Chocobozzz <me@florianbigard.com>
22 lines
700 B
TypeScript
22 lines
700 B
TypeScript
import { join } from 'path'
|
|
import { MStreamingPlaylistVideo } from '@server/types/models/index.js'
|
|
|
|
export function generateHLSObjectStorageKey (playlist: MStreamingPlaylistVideo, filename: string) {
|
|
return join(generateHLSObjectBaseStorageKey(playlist), filename)
|
|
}
|
|
|
|
export function generateHLSObjectBaseStorageKey (playlist: MStreamingPlaylistVideo) {
|
|
return join(playlist.getStringType(), playlist.Video.uuid)
|
|
}
|
|
|
|
export function generateWebVideoObjectStorageKey (filename: string) {
|
|
return filename
|
|
}
|
|
|
|
export function generateOriginalVideoObjectStorageKey (filename: string) {
|
|
return filename
|
|
}
|
|
|
|
export function generateUserExportObjectStorageKey (filename: string) {
|
|
return filename
|
|
}
|