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
42153d6b45
commit
9e7a3611be
1 changed files with 4 additions and 3 deletions
|
@ -90,7 +90,8 @@ async function getOptions(channel) {
|
|||
let variants = []
|
||||
variants.push(`${channel.name.trim()} | ${generateCode(channel.name, defaultCountry)}${newLabel}`)
|
||||
similar.forEach(i => {
|
||||
variants.push(`${i.name} | ${i.id} [api]`)
|
||||
let alt_names = i.alt_names.length ? ` (${i.alt_names.join(',')})` : ''
|
||||
variants.push(`${i.name}${alt_names} | ${i.id} [api]`)
|
||||
})
|
||||
variants.push(`Overwrite...`)
|
||||
variants.push(`Skip...`)
|
||||
|
@ -102,10 +103,10 @@ async function getSimilar(list, channel) {
|
|||
return list.filter(i =>
|
||||
i.name
|
||||
.toLowerCase()
|
||||
.replace(/\s|-|:/gi, '')
|
||||
.replace(/[^a-z0-9]/gi, '')
|
||||
.startsWith(
|
||||
channel.name
|
||||
.replace(/(\s|-|:)/gi, '')
|
||||
.replace(/[^a-z0-9]/gi, '')
|
||||
.slice(0, 8)
|
||||
.toLowerCase()
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue