Update update-codes.js

This commit is contained in:
Aleksandr Statciuk 2021-09-16 01:37:33 +03:00
parent ca1eac0fa5
commit e60346c440

View file

@ -17,8 +17,11 @@ async function main() {
.catch(console.log)
const channels = parseChannels(file)
channels.forEach(channel => {
if (!codes[channel.tvg_id + channel.display_name]) {
codes[channel.tvg_id + channel.display_name] = channel
if (!codes[channel.tvg_id]) {
channel.guides = [url]
codes[channel.tvg_id] = channel
} else {
codes[channel.tvg_id].guides.push(url)
}
})
}