Disable interlude in the same cases where loading screen is disabled.

This commit is contained in:
vexorian 2023-11-26 21:02:36 -04:00
parent c2bb2c8df1
commit c427322f37

View File

@ -582,12 +582,14 @@ function video( channelService, fillerDB, db, programmingService, activeChannelS
let sessionId = StreamCount++;
let audioOnly = ("true" == req.query.audioOnly);
if (
(ffmpegSettings.enableFFMPEGTranscoding === true)
let transcodingEnabled = (ffmpegSettings.enableFFMPEGTranscoding === true)
&& (ffmpegSettings.normalizeVideoCodec === true)
&& (ffmpegSettings.normalizeAudioCodec === true)
&& (ffmpegSettings.normalizeResolution === true)
&& (ffmpegSettings.normalizeAudio === true)
&& (ffmpegSettings.normalizeAudio === true);
if (
transcodingEnabled
&& (audioOnly !== true) /* loading screen is pointless in audio mode (also for some reason it makes it fail when codec is aac, and I can't figure out why) */
&& (stepNumber == 0)
) {
@ -598,13 +600,17 @@ function video( channelService, fillerDB, db, programmingService, activeChannelS
if (stepNumber == 0) {
data += `file 'http://localhost:${process.env.PORT}/stream?channel=${channelNum}&first=1&session=${sessionId}&audioOnly=${audioOnly}'\n`
data += `file 'http://localhost:${process.env.PORT}/stream?channel=${channelNum}&between=1&session=${sessionId}&audioOnly=${audioOnly}'\n`;
if (transcodingEnabled && (audioOnly !== true)) {
data += `file 'http://localhost:${process.env.PORT}/stream?channel=${channelNum}&between=1&session=${sessionId}&audioOnly=${audioOnly}'\n`;
}
remaining--;
}
for (var i = 0; i < remaining; i++) {
data += `file 'http://localhost:${process.env.PORT}/stream?channel=${channelNum}&session=${sessionId}&audioOnly=${audioOnly}'\n`
data += `file 'http://localhost:${process.env.PORT}/stream?channel=${channelNum}&between=1&session=${sessionId}&audioOnly=${audioOnly}'\n`
if (transcodingEnabled && (audioOnly !== true) ) {
data += `file 'http://localhost:${process.env.PORT}/stream?channel=${channelNum}&between=1&session=${sessionId}&audioOnly=${audioOnly}'\n`
}
}
res.send(data)