Update grab.js

This commit is contained in:
Aleksandr Statciuk 2021-10-06 05:16:02 +03:00
parent 26e7fb4ab4
commit 970c0d40ea

View file

@ -17,7 +17,14 @@ const options = program.opts()
async function main() {
console.log('Starting...')
const channels = parseChannels(options.channels)
const buffer = {}
const channels = parseChannels(options.channels).filter(channel => {
if (!buffer[channel.xmltv_id]) {
buffer[channel.xmltv_id] = true
return true
}
return false
})
console.log('Parsing:')
let programs = []