X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Fpaths.ts;h=b29854700eda5fa9dbe465493960ed8fb41e0e65;hb=cea2fd90ddb3bf57c2fed77128938d12d4c2be6b;hp=bf0c3a86b71ff27679cbe65362ad302a39bac87f;hpb=c55e3d7227fe1453869e309025996b9d75256d5d;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/paths.ts b/server/lib/paths.ts index bf0c3a86b..b29854700 100644 --- a/server/lib/paths.ts +++ b/server/lib/paths.ts @@ -1,8 +1,9 @@ import { join } from 'path' 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 { buildUUID, removeFragmentedMP4Ext } from '@shared/core-utils' +import { removeFragmentedMP4Ext } from '@shared/core-utils' +import { buildUUID } from '@shared/extra-utils' // ################## Video file name ################## @@ -20,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) } @@ -73,6 +78,7 @@ export { getHLSDirectory, getLiveDirectory, + getLiveReplayBaseDirectory, getHLSRedundancyDirectory, generateHLSMasterPlaylistFilename,