mirror of
https://github.com/iptv-org/epg
synced 2026-03-21 11:20:53 -04:00
Update edit.ts
This commit is contained in:
@@ -8,7 +8,6 @@ import { Channel } from '../../models'
|
||||
import nodeCleanup from 'node-cleanup'
|
||||
import * as sdk from '@iptv-org/sdk'
|
||||
import { Command } from 'commander'
|
||||
import readline from 'readline'
|
||||
|
||||
interface ChoiceValue {
|
||||
type: string
|
||||
@@ -21,17 +20,6 @@ interface Choice {
|
||||
default?: boolean
|
||||
}
|
||||
|
||||
if (process.platform === 'win32') {
|
||||
readline
|
||||
.createInterface({
|
||||
input: process.stdin,
|
||||
output: process.stdout
|
||||
})
|
||||
.on('SIGINT', function () {
|
||||
process.emit('SIGINT')
|
||||
})
|
||||
}
|
||||
|
||||
const program = new Command()
|
||||
|
||||
program.argument('<filepath>', 'Path to *.channels.xml file to edit').parse(process.argv)
|
||||
@@ -44,6 +32,7 @@ let channelsFromXML = new Collection<Channel>()
|
||||
main(filepath)
|
||||
nodeCleanup(() => {
|
||||
save(filepath, channelsFromXML)
|
||||
if (process.platform === 'win32') process.kill(0)
|
||||
})
|
||||
|
||||
export default async function main(filepath: string) {
|
||||
|
||||
Reference in New Issue
Block a user