mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
Merge pull request #88 from iptv-org/add-guides-prop
Update update-codes.js
This commit is contained in:
commit
ebdf328fa6
2 changed files with 10 additions and 3 deletions
|
@ -109,7 +109,11 @@ If successful, you should get the following response:
|
|||
"tvg_id": "CNNUSA.us",
|
||||
"display_name": "CNN USA",
|
||||
"logo": "https://cdn.tvpassport.com/image/station/100x100/cnn.png",
|
||||
"country": "us"
|
||||
"country": "us",
|
||||
"guides": [
|
||||
"https://iptv-org.github.io/epg/guides/tvtv.us.guide.xml",
|
||||
...
|
||||
]
|
||||
},
|
||||
...
|
||||
]
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue