mirror of
https://github.com/iptv-org/epg
synced 2025-12-15 18:06:40 -05:00
additional updates.
This commit is contained in:
@@ -44,7 +44,7 @@ program
|
||||
.default(false)
|
||||
.env('GZIP')
|
||||
)
|
||||
.parse(process.argv)
|
||||
.parse()
|
||||
|
||||
export type GrabOptions = {
|
||||
site?: string
|
||||
@@ -102,7 +102,10 @@ async function main() {
|
||||
runJob({ logger, parsedChannels })
|
||||
}
|
||||
|
||||
main()
|
||||
main().catch(error => {
|
||||
console.error('ERR:', error.message)
|
||||
process.exit(1)
|
||||
})
|
||||
|
||||
async function runJob({ logger, parsedChannels }: { logger: Logger; parsedChannels: Collection }) {
|
||||
const timer = new Timer()
|
||||
|
||||
@@ -35,7 +35,7 @@ export class Guide {
|
||||
const programs = this.programs
|
||||
|
||||
const currDate = new DateTime(process.env.CURR_DATE || new Date().toISOString(), {
|
||||
zone: 'UTC'
|
||||
timezone: 'UTC'
|
||||
})
|
||||
const xmltv = new XMLTV({
|
||||
channels,
|
||||
@@ -50,7 +50,7 @@ export class Guide {
|
||||
|
||||
if (this.gzip) {
|
||||
const zip = new Zip()
|
||||
const compressed = await zip.compress(xmltv.toString())
|
||||
const compressed = zip.compress(xmltv.toString())
|
||||
const gzFilepath = `${this.filepath}.gz`
|
||||
const gzFilename = path.basename(gzFilepath)
|
||||
this.logger.info(` saving to "${gzFilepath}"...`)
|
||||
|
||||
Reference in New Issue
Block a user