mirror of
https://github.com/iptv-org/epg
synced 2026-03-22 03:41:02 -04:00
Update edit.ts
This commit is contained in:
@@ -85,8 +85,7 @@ export default async function main(filepath: string) {
|
||||
}
|
||||
|
||||
async function selectChannel(channel: epgGrabber.Channel): Promise<string> {
|
||||
const query = escapeRegex(channel.name)
|
||||
const similarChannels = searchChannels(query)
|
||||
const similarChannels = searchChannels(channel.name)
|
||||
const choices = getChoicesForChannel(similarChannels).all()
|
||||
|
||||
const selected: ChoiceValue = await select({
|
||||
@@ -194,7 +193,3 @@ function save(filepath: string, channelsFromXML: Collection<Channel>) {
|
||||
console.log()
|
||||
logger.info(`File '${filepath}' successfully saved`)
|
||||
}
|
||||
|
||||
function escapeRegex(string: string) {
|
||||
return string.replace(/[/\-\\^$*+?.()|[\]{}]/g, '\\$&')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user