From 92083e42289e19033425672dfbe2234aef03c6df Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 24 Jun 2022 09:34:56 +0200 Subject: Fix removed sha segments on fast restream --- server/lib/job-queue/handlers/video-live-ending.ts | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'server/lib/job-queue/handlers') diff --git a/server/lib/job-queue/handlers/video-live-ending.ts b/server/lib/job-queue/handlers/video-live-ending.ts index 450bda2fd..b2c42664a 100644 --- a/server/lib/job-queue/handlers/video-live-ending.ts +++ b/server/lib/job-queue/handlers/video-live-ending.ts @@ -4,13 +4,8 @@ import { join } from 'path' import { ffprobePromise, getAudioStream, getVideoStreamDimensionsInfo, getVideoStreamDuration } from '@server/helpers/ffmpeg' import { getLocalVideoActivityPubUrl } from '@server/lib/activitypub/url' import { federateVideoIfNeeded } from '@server/lib/activitypub/videos' -import { cleanupUnsavedNormalLive, cleanupPermanentLive, cleanupTMPLiveFiles, LiveSegmentShaStore } from '@server/lib/live' -import { - generateHLSMasterPlaylistFilename, - generateHlsSha256SegmentsFilename, - getLiveDirectory, - getLiveReplayBaseDirectory -} from '@server/lib/paths' +import { cleanupPermanentLive, cleanupTMPLiveFiles, cleanupUnsavedNormalLive } from '@server/lib/live' +import { generateHLSMasterPlaylistFilename, generateHlsSha256SegmentsFilename, getLiveReplayBaseDirectory } from '@server/lib/paths' import { generateVideoMiniature } from '@server/lib/thumbnail' import { generateHlsPlaylistResolutionFromTS } from '@server/lib/transcoding/transcoding' import { moveToNextState } from '@server/lib/video-state' @@ -44,8 +39,6 @@ async function processVideoLiveEnding (job: Job) { return } - LiveSegmentShaStore.Instance.cleanupShaSegments(liveVideo.uuid) - if (live.saveReplay !== true) { return cleanupLiveAndFederate({ live, video: liveVideo, streamingPlaylistId: payload.streamingPlaylistId }) } @@ -137,7 +130,7 @@ async function replaceLiveByReplay (options: { }) { const { liveVideo, liveSession, live, replayDirectory } = options - await cleanupTMPLiveFiles(getLiveDirectory(liveVideo)) + await cleanupTMPLiveFiles(liveVideo) await live.destroy() -- cgit v1.2.3