mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-09 16:40:07 -04:00
wip
This commit is contained in:
parent
df51fe3d45
commit
3d0d891ef5
2 changed files with 5 additions and 4 deletions
|
@ -36,15 +36,16 @@ async function generateMainXML() {
|
|||
async function generateCountries() {
|
||||
logger.info(`Generating countries/...`)
|
||||
|
||||
const countryCodes = Object.keys(programs).map(id => channels[id].country)
|
||||
const filteredChannels = Object.keys(programs).map(id => channels[id])
|
||||
|
||||
for (let code of countryCodes) {
|
||||
for (let channel of filteredChannels) {
|
||||
const code = channel.country
|
||||
const output = {
|
||||
channels: [],
|
||||
programs: []
|
||||
}
|
||||
|
||||
output.channels = _.flatten(Object.values(channels))
|
||||
output.channels = filteredChannels
|
||||
.filter(c => c.country === code)
|
||||
.map(c => {
|
||||
c.site = sources[c.id]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue