mirror of
https://github.com/iptv-org/epg
synced 2025-12-19 03:46:41 -05:00
Merge pull request #88 from iptv-org/add-guides-prop
Update update-codes.js
This commit is contained in:
@@ -109,7 +109,11 @@ If successful, you should get the following response:
|
|||||||
"tvg_id": "CNNUSA.us",
|
"tvg_id": "CNNUSA.us",
|
||||||
"display_name": "CNN USA",
|
"display_name": "CNN USA",
|
||||||
"logo": "https://cdn.tvpassport.com/image/station/100x100/cnn.png",
|
"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)
|
.catch(console.log)
|
||||||
const channels = parseChannels(file)
|
const channels = parseChannels(file)
|
||||||
channels.forEach(channel => {
|
channels.forEach(channel => {
|
||||||
if (!codes[channel.tvg_id + channel.display_name]) {
|
if (!codes[channel.tvg_id]) {
|
||||||
codes[channel.tvg_id + channel.display_name] = channel
|
channel.guides = [url]
|
||||||
|
codes[channel.tvg_id] = channel
|
||||||
|
} else {
|
||||||
|
codes[channel.tvg_id].guides.push(url)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user