mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-09 16:40:07 -04:00
Update editor.js
This commit is contained in:
parent
c4400e8359
commit
7ea19436a8
1 changed files with 5 additions and 2 deletions
|
@ -92,7 +92,9 @@ async function getOptions(channel) {
|
|||
variants.push(`${channel.name.trim()} | ${channelId}${newLabel}`)
|
||||
similar.forEach(i => {
|
||||
let alt_names = i.alt_names.length ? ` (${i.alt_names.join(',')})` : ''
|
||||
variants.push(`${i.name}${alt_names} | ${i.id} [api]`)
|
||||
let closed = i.closed ? `[closed:${i.closed}]` : ``
|
||||
let replaced_by = i.replaced_by ? `[replaced_by:${i.replaced_by}]` : ''
|
||||
variants.push(`${i.name}${alt_names} | ${i.id} ${closed}${replaced_by}[api]`)
|
||||
})
|
||||
variants.push(`Overwrite...`)
|
||||
variants.push(`Skip...`)
|
||||
|
@ -101,7 +103,8 @@ async function getOptions(channel) {
|
|||
}
|
||||
|
||||
async function getSimilar(list, channelId) {
|
||||
return list.filter(i => i.id.toLowerCase().startsWith(channelId.slice(0, 8).toLowerCase()))
|
||||
const normChannelId = channelId.split('.')[0].slice(0, 8).toLowerCase()
|
||||
return list.filter(i => i.id.split('.')[0].toLowerCase().startsWith(normChannelId))
|
||||
}
|
||||
|
||||
function generateCode(name, country) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue