Added new channels and modified json generator

This commit is contained in:
Joan
2024-09-10 18:28:20 +02:00
parent 6b7029f7c4
commit dbd476389d
3 changed files with 2065 additions and 19 deletions

View File

@@ -14,9 +14,16 @@ const activeStreams = {}; // Store active stream processes with unique IDs
fs.watch(channelsPath, (eventType, filename) => {
if (eventType === 'change') {
console.log(`====================================`);
console.log(`channels.json was updated, reloading...`);
try {
channels = JSON.parse(fs.readFileSync(channelsPath, 'utf8'));
// Log every channel loaded
for (const channel in channels) {
console.log(`Channel loaded: ${channel}`);
}
console.log(`Channels reloaded`);
console.log(`====================================`);
} catch (error) {
console.log(error.message);
}
@@ -40,7 +47,7 @@ const delay = channel.delay;
let args = [
channel.url,
'--use-shaka-packager',
// '--log-level', 'INFO',
'--log-level', 'OFF',
'--no-log',
// '--live-real-time-merge', 'true',
// '--mp4-real-time-decryption', 'true',