mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 02:09:37 +02:00
Add config option to keep original video file (basic first version) (#6157)
* 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>
This commit is contained in:
parent
ae31e90c30
commit
e57c3024f4
75 changed files with 1653 additions and 801 deletions
|
@ -1,25 +1,22 @@
|
|||
import { join } from 'path'
|
||||
import { MStreamingPlaylistVideo } from '@server/types/models/index.js'
|
||||
|
||||
function generateHLSObjectStorageKey (playlist: MStreamingPlaylistVideo, filename: string) {
|
||||
export function generateHLSObjectStorageKey (playlist: MStreamingPlaylistVideo, filename: string) {
|
||||
return join(generateHLSObjectBaseStorageKey(playlist), filename)
|
||||
}
|
||||
|
||||
function generateHLSObjectBaseStorageKey (playlist: MStreamingPlaylistVideo) {
|
||||
export function generateHLSObjectBaseStorageKey (playlist: MStreamingPlaylistVideo) {
|
||||
return join(playlist.getStringType(), playlist.Video.uuid)
|
||||
}
|
||||
|
||||
function generateWebVideoObjectStorageKey (filename: string) {
|
||||
export function generateWebVideoObjectStorageKey (filename: string) {
|
||||
return filename
|
||||
}
|
||||
|
||||
function generateUserExportObjectStorageKey (filename: string) {
|
||||
export function generateOriginalVideoObjectStorageKey (filename: string) {
|
||||
return filename
|
||||
}
|
||||
|
||||
export {
|
||||
generateHLSObjectStorageKey,
|
||||
generateHLSObjectBaseStorageKey,
|
||||
generateWebVideoObjectStorageKey,
|
||||
generateUserExportObjectStorageKey
|
||||
export function generateUserExportObjectStorageKey (filename: string) {
|
||||
return filename
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue