mirror of
https://github.com/iptv-org/epg
synced 2025-12-16 10:26:41 -05:00
Update editor.js
This commit is contained in:
@@ -90,7 +90,8 @@ async function getOptions(channel) {
|
|||||||
let variants = []
|
let variants = []
|
||||||
variants.push(`${channel.name.trim()} | ${generateCode(channel.name, defaultCountry)}${newLabel}`)
|
variants.push(`${channel.name.trim()} | ${generateCode(channel.name, defaultCountry)}${newLabel}`)
|
||||||
similar.forEach(i => {
|
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(`Overwrite...`)
|
||||||
variants.push(`Skip...`)
|
variants.push(`Skip...`)
|
||||||
@@ -102,10 +103,10 @@ async function getSimilar(list, channel) {
|
|||||||
return list.filter(i =>
|
return list.filter(i =>
|
||||||
i.name
|
i.name
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.replace(/\s|-|:/gi, '')
|
.replace(/[^a-z0-9]/gi, '')
|
||||||
.startsWith(
|
.startsWith(
|
||||||
channel.name
|
channel.name
|
||||||
.replace(/(\s|-|:)/gi, '')
|
.replace(/[^a-z0-9]/gi, '')
|
||||||
.slice(0, 8)
|
.slice(0, 8)
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user