mirror of
https://github.com/iptv-org/iptv
synced 2026-03-21 19:31:01 -04:00
Update edit.ts
This commit is contained in:
@@ -76,8 +76,7 @@ export default async function main(filepath: string) {
|
||||
}
|
||||
|
||||
async function selectChannel(stream: Stream): Promise<string> {
|
||||
const query = escapeRegex(stream.title)
|
||||
const similarChannels = searchChannels(query)
|
||||
const similarChannels = searchChannels(stream.title)
|
||||
const url = truncate(stream.url, 50)
|
||||
|
||||
const selected: ChoiceValue = await select({
|
||||
@@ -184,7 +183,3 @@ function save(filepath: string) {
|
||||
storage.saveSync(filepath, playlist.toString())
|
||||
logger.info(`\nFile '${filepath}' successfully saved`)
|
||||
}
|
||||
|
||||
function escapeRegex(string: string) {
|
||||
return string.replace(/[/\-\\^$*+?.()|[\]{}]/g, '\\$&')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user