diff options
author | Chocobozzz <me@florianbigard.com> | 2022-06-24 09:34:56 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-06-24 09:57:55 +0200 |
commit | 92083e42289e19033425672dfbe2234aef03c6df (patch) | |
tree | 01746b73d351f2a44932794549532b6a5ead1cbd /server/lib/job-queue | |
parent | 383dbdec67fc474652c4e59440238da0b2fb6e8c (diff) | |
download | PeerTube-92083e42289e19033425672dfbe2234aef03c6df.tar.gz PeerTube-92083e42289e19033425672dfbe2234aef03c6df.tar.zst PeerTube-92083e42289e19033425672dfbe2234aef03c6df.zip |
Fix removed sha segments on fast restream
Diffstat (limited to 'server/lib/job-queue')
-rw-r--r-- | server/lib/job-queue/handlers/video-live-ending.ts | 13 |
1 files changed, 3 insertions, 10 deletions
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' | |||
4 | import { ffprobePromise, getAudioStream, getVideoStreamDimensionsInfo, getVideoStreamDuration } from '@server/helpers/ffmpeg' | 4 | import { ffprobePromise, getAudioStream, getVideoStreamDimensionsInfo, getVideoStreamDuration } from '@server/helpers/ffmpeg' |
5 | import { getLocalVideoActivityPubUrl } from '@server/lib/activitypub/url' | 5 | import { getLocalVideoActivityPubUrl } from '@server/lib/activitypub/url' |
6 | import { federateVideoIfNeeded } from '@server/lib/activitypub/videos' | 6 | import { federateVideoIfNeeded } from '@server/lib/activitypub/videos' |
7 | import { cleanupUnsavedNormalLive, cleanupPermanentLive, cleanupTMPLiveFiles, LiveSegmentShaStore } from '@server/lib/live' | 7 | import { cleanupPermanentLive, cleanupTMPLiveFiles, cleanupUnsavedNormalLive } from '@server/lib/live' |
8 | import { | 8 | import { generateHLSMasterPlaylistFilename, generateHlsSha256SegmentsFilename, getLiveReplayBaseDirectory } from '@server/lib/paths' |
9 | generateHLSMasterPlaylistFilename, | ||
10 | generateHlsSha256SegmentsFilename, | ||
11 | getLiveDirectory, | ||
12 | getLiveReplayBaseDirectory | ||
13 | } from '@server/lib/paths' | ||
14 | import { generateVideoMiniature } from '@server/lib/thumbnail' | 9 | import { generateVideoMiniature } from '@server/lib/thumbnail' |
15 | import { generateHlsPlaylistResolutionFromTS } from '@server/lib/transcoding/transcoding' | 10 | import { generateHlsPlaylistResolutionFromTS } from '@server/lib/transcoding/transcoding' |
16 | import { moveToNextState } from '@server/lib/video-state' | 11 | import { moveToNextState } from '@server/lib/video-state' |
@@ -44,8 +39,6 @@ async function processVideoLiveEnding (job: Job) { | |||
44 | return | 39 | return |
45 | } | 40 | } |
46 | 41 | ||
47 | LiveSegmentShaStore.Instance.cleanupShaSegments(liveVideo.uuid) | ||
48 | |||
49 | if (live.saveReplay !== true) { | 42 | if (live.saveReplay !== true) { |
50 | return cleanupLiveAndFederate({ live, video: liveVideo, streamingPlaylistId: payload.streamingPlaylistId }) | 43 | return cleanupLiveAndFederate({ live, video: liveVideo, streamingPlaylistId: payload.streamingPlaylistId }) |
51 | } | 44 | } |
@@ -137,7 +130,7 @@ async function replaceLiveByReplay (options: { | |||
137 | }) { | 130 | }) { |
138 | const { liveVideo, liveSession, live, replayDirectory } = options | 131 | const { liveVideo, liveSession, live, replayDirectory } = options |
139 | 132 | ||
140 | await cleanupTMPLiveFiles(getLiveDirectory(liveVideo)) | 133 | await cleanupTMPLiveFiles(liveVideo) |
141 | 134 | ||
142 | await live.destroy() | 135 | await live.destroy() |
143 | 136 | ||