mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-09 16:40:07 -04:00
Update parse.ts
This commit is contained in:
parent
25093cb927
commit
e7bbc7db23
1 changed files with 2 additions and 2 deletions
|
@ -2,7 +2,7 @@ import { Logger, File, Collection, Storage } from '@freearhey/core'
|
||||||
import { ChannelsParser, XML } from '../../core'
|
import { ChannelsParser, XML } from '../../core'
|
||||||
import { Channel } from 'epg-grabber'
|
import { Channel } from 'epg-grabber'
|
||||||
import { Command } from 'commander'
|
import { Command } from 'commander'
|
||||||
import path from 'path'
|
import { pathToFileURL } from 'node:url'
|
||||||
|
|
||||||
const program = new Command()
|
const program = new Command()
|
||||||
program
|
program
|
||||||
|
@ -26,7 +26,7 @@ async function main() {
|
||||||
const logger = new Logger()
|
const logger = new Logger()
|
||||||
const file = new File(options.config)
|
const file = new File(options.config)
|
||||||
const dir = file.dirname()
|
const dir = file.dirname()
|
||||||
const config = (await import(path.resolve(options.config))).default
|
const config = (await import(pathToFileURL(options.config))).default
|
||||||
const outputFilepath = options.output || `${dir}/${config.site}.channels.xml`
|
const outputFilepath = options.output || `${dir}/${config.site}.channels.xml`
|
||||||
|
|
||||||
let channels = new Collection()
|
let channels = new Collection()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue