aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/live/live-manager.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-05-25 15:22:28 +0200
committerChocobozzz <me@florianbigard.com>2022-05-25 15:22:28 +0200
commitab623c0e0b4815bd69a94887241a69aaa857ed26 (patch)
tree9140675d0aa501d9ddbbcf14bbdb5c28b6ef0712 /server/lib/live/live-manager.ts
parentc501cdef27e6769b7d2a13ac7b6deeb2e61eee46 (diff)
parentc8fdfab0e36cc7324c61710009bf334e836485d9 (diff)
downloadPeerTube-ab623c0e0b4815bd69a94887241a69aaa857ed26.tar.gz
PeerTube-ab623c0e0b4815bd69a94887241a69aaa857ed26.tar.zst
PeerTube-ab623c0e0b4815bd69a94887241a69aaa857ed26.zip
Merge branch 'release/4.2.0' into develop
Diffstat (limited to 'server/lib/live/live-manager.ts')
-rw-r--r--server/lib/live/live-manager.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/server/lib/live/live-manager.ts b/server/lib/live/live-manager.ts
index e04ae9fef..0f14a6851 100644
--- a/server/lib/live/live-manager.ts
+++ b/server/lib/live/live-manager.ts
@@ -28,7 +28,7 @@ import { generateHLSMasterPlaylistFilename, generateHlsSha256SegmentsFilename, g
28import { PeerTubeSocket } from '../peertube-socket' 28import { PeerTubeSocket } from '../peertube-socket'
29import { LiveQuotaStore } from './live-quota-store' 29import { LiveQuotaStore } from './live-quota-store'
30import { LiveSegmentShaStore } from './live-segment-sha-store' 30import { LiveSegmentShaStore } from './live-segment-sha-store'
31import { cleanupLive } from './live-utils' 31import { cleanupPermanentLive } from './live-utils'
32import { MuxingSession } from './shared' 32import { MuxingSession } from './shared'
33 33
34const NodeRtmpSession = require('node-media-server/src/node_rtmp_session') 34const NodeRtmpSession = require('node-media-server/src/node_rtmp_session')
@@ -224,7 +224,9 @@ class LiveManager {
224 224
225 const oldStreamingPlaylist = await VideoStreamingPlaylistModel.loadHLSPlaylistByVideo(video.id) 225 const oldStreamingPlaylist = await VideoStreamingPlaylistModel.loadHLSPlaylistByVideo(video.id)
226 if (oldStreamingPlaylist) { 226 if (oldStreamingPlaylist) {
227 await cleanupLive(video, oldStreamingPlaylist) 227 if (!videoLive.permanentLive) throw new Error('Found previous session in a non permanent live: ' + video.uuid)
228
229 await cleanupPermanentLive(video, oldStreamingPlaylist)
228 } 230 }
229 231
230 this.videoSessions.set(video.id, sessionId) 232 this.videoSessions.set(video.id, sessionId)