aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/paths.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-04-21 09:06:52 +0200
committerChocobozzz <me@florianbigard.com>2022-04-21 11:47:57 +0200
commit4ec52d04dcc5d664612331f8e08d7d90da990415 (patch)
tree4b193f9f8f210caaf2dbe05ef3e37fa3a6fc28f0 /server/lib/paths.ts
parent2024a3b9338d667640aa115da6071ea83d088c50 (diff)
downloadPeerTube-4ec52d04dcc5d664612331f8e08d7d90da990415.tar.gz
PeerTube-4ec52d04dcc5d664612331f8e08d7d90da990415.tar.zst
PeerTube-4ec52d04dcc5d664612331f8e08d7d90da990415.zip
Add ability to save replay of permanent lives
Diffstat (limited to 'server/lib/paths.ts')
-rw-r--r--server/lib/paths.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/server/lib/paths.ts b/server/lib/paths.ts
index 5a85bea42..b29854700 100644
--- a/server/lib/paths.ts
+++ b/server/lib/paths.ts
@@ -1,6 +1,6 @@
1import { join } from 'path' 1import { join } from 'path'
2import { CONFIG } from '@server/initializers/config' 2import { CONFIG } from '@server/initializers/config'
3import { HLS_REDUNDANCY_DIRECTORY, HLS_STREAMING_PLAYLIST_DIRECTORY } from '@server/initializers/constants' 3import { HLS_REDUNDANCY_DIRECTORY, HLS_STREAMING_PLAYLIST_DIRECTORY, VIDEO_LIVE } from '@server/initializers/constants'
4import { isStreamingPlaylist, MStreamingPlaylistVideo, MVideo, MVideoFile, MVideoUUID } from '@server/types/models' 4import { isStreamingPlaylist, MStreamingPlaylistVideo, MVideo, MVideoFile, MVideoUUID } from '@server/types/models'
5import { removeFragmentedMP4Ext } from '@shared/core-utils' 5import { removeFragmentedMP4Ext } from '@shared/core-utils'
6import { buildUUID } from '@shared/extra-utils' 6import { buildUUID } from '@shared/extra-utils'
@@ -21,6 +21,10 @@ function getLiveDirectory (video: MVideoUUID) {
21 return getHLSDirectory(video) 21 return getHLSDirectory(video)
22} 22}
23 23
24function getLiveReplayBaseDirectory (video: MVideoUUID) {
25 return join(getLiveDirectory(video), VIDEO_LIVE.REPLAY_DIRECTORY)
26}
27
24function getHLSDirectory (video: MVideoUUID) { 28function getHLSDirectory (video: MVideoUUID) {
25 return join(HLS_STREAMING_PLAYLIST_DIRECTORY, video.uuid) 29 return join(HLS_STREAMING_PLAYLIST_DIRECTORY, video.uuid)
26} 30}
@@ -74,6 +78,7 @@ export {
74 78
75 getHLSDirectory, 79 getHLSDirectory,
76 getLiveDirectory, 80 getLiveDirectory,
81 getLiveReplayBaseDirectory,
77 getHLSRedundancyDirectory, 82 getHLSRedundancyDirectory,
78 83
79 generateHLSMasterPlaylistFilename, 84 generateHLSMasterPlaylistFilename,