wip
This commit is contained in:
parent
5de6ad61db
commit
8b4ae200b0
@ -77,6 +77,23 @@ async function main() {
|
|||||||
buffer[epgUrl] = epg
|
buffer[epgUrl] = epg
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(buffer[epgUrl]) {
|
||||||
|
console.log('Add missing tvg-id from EPG by channel title...')
|
||||||
|
for(let channel of channels) {
|
||||||
|
for(let channelId in buffer[epgUrl].channels) {
|
||||||
|
let c = buffer[epgUrl].channels[channelId]
|
||||||
|
for(let epgName of c.names) {
|
||||||
|
let regexp = new RegExp(`^${epgName}`, 'i')
|
||||||
|
if(regexp.test(channel.title)) {
|
||||||
|
if(!channel.id) {
|
||||||
|
channel.id = c.id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(buffer[epgUrl]) {
|
if(buffer[epgUrl]) {
|
||||||
console.log(`Fills in missing channel's data...`)
|
console.log(`Fills in missing channel's data...`)
|
||||||
for(let channel of channels) {
|
for(let channel of channels) {
|
||||||
|
Loading…
Reference in New Issue
Block a user