X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Fpaths.ts;h=b29854700eda5fa9dbe465493960ed8fb41e0e65;hb=cea2fd90ddb3bf57c2fed77128938d12d4c2be6b;hp=d8cf812e3bce15d2384fbf26489c32c3159da4b6;hpb=06aad80165d09a8863ab8103149a8ff518b10641;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/paths.ts b/server/lib/paths.ts index d8cf812e3..b29854700 100644 --- a/server/lib/paths.ts +++ b/server/lib/paths.ts @@ -1,9 +1,9 @@ import { join } from 'path' -import { buildUUID } from '@shared/core-utils/uuid' import { CONFIG } from '@server/initializers/config' -import { HLS_REDUNDANCY_DIRECTORY, HLS_STREAMING_PLAYLIST_DIRECTORY } from '@server/initializers/constants' +import { HLS_REDUNDANCY_DIRECTORY, HLS_STREAMING_PLAYLIST_DIRECTORY, VIDEO_LIVE } from '@server/initializers/constants' import { isStreamingPlaylist, MStreamingPlaylistVideo, MVideo, MVideoFile, MVideoUUID } from '@server/types/models' import { removeFragmentedMP4Ext } from '@shared/core-utils' +import { buildUUID } from '@shared/extra-utils' // ################## Video file name ################## @@ -21,6 +21,10 @@ function getLiveDirectory (video: MVideoUUID) { return getHLSDirectory(video) } +function getLiveReplayBaseDirectory (video: MVideoUUID) { + return join(getLiveDirectory(video), VIDEO_LIVE.REPLAY_DIRECTORY) +} + function getHLSDirectory (video: MVideoUUID) { return join(HLS_STREAMING_PLAYLIST_DIRECTORY, video.uuid) } @@ -74,6 +78,7 @@ export { getHLSDirectory, getLiveDirectory, + getLiveReplayBaseDirectory, getHLSRedundancyDirectory, generateHLSMasterPlaylistFilename,