diff options
Diffstat (limited to 'server/lib/live/live-manager.ts')
-rw-r--r-- | server/lib/live/live-manager.ts | 6 |
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 | |||
28 | import { PeerTubeSocket } from '../peertube-socket' | 28 | import { PeerTubeSocket } from '../peertube-socket' |
29 | import { LiveQuotaStore } from './live-quota-store' | 29 | import { LiveQuotaStore } from './live-quota-store' |
30 | import { LiveSegmentShaStore } from './live-segment-sha-store' | 30 | import { LiveSegmentShaStore } from './live-segment-sha-store' |
31 | import { cleanupLive } from './live-utils' | 31 | import { cleanupPermanentLive } from './live-utils' |
32 | import { MuxingSession } from './shared' | 32 | import { MuxingSession } from './shared' |
33 | 33 | ||
34 | const NodeRtmpSession = require('node-media-server/src/node_rtmp_session') | 34 | const 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) |