mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-09 16:40:07 -04:00
Update update-api.js
This commit is contained in:
parent
421fa4580c
commit
2563aab667
2 changed files with 8 additions and 4 deletions
|
@ -26,16 +26,20 @@ async function loadChannels() {
|
|||
if (!output[item.xmltv_id]) {
|
||||
output[item.xmltv_id] = {
|
||||
id: item.xmltv_id,
|
||||
name: [item.name],
|
||||
name: [],
|
||||
logo: item.logo || null,
|
||||
country: item.country
|
||||
country: item.country,
|
||||
guides: []
|
||||
}
|
||||
} else {
|
||||
output[item.xmltv_id].logo = output[item.xmltv_id].logo || item.logo
|
||||
output[item.xmltv_id].name.push(item.name)
|
||||
}
|
||||
|
||||
output[item.xmltv_id].name.push(item.name)
|
||||
output[item.xmltv_id].name = _.uniq(output[item.xmltv_id].name)
|
||||
output[item.xmltv_id].guides.push(
|
||||
`https://iptv-org.github.io/epg/guides/${item.gid}/${item.site}.epg.xml`
|
||||
)
|
||||
})
|
||||
|
||||
return Object.values(output)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue