mirror of
https://github.com/iptv-org/epg
synced 2025-12-16 10:26:41 -05:00
Upgrade epg-grabber package
This commit is contained in:
@@ -19,6 +19,7 @@ export class Grabber {
|
||||
this.logger = logger
|
||||
this.queue = queue
|
||||
this.options = options
|
||||
this.grabber = process.env.NODE_ENV === 'test' ? new EPGGrabberMock() : new EPGGrabber()
|
||||
}
|
||||
|
||||
async grab(): Promise<{ channels: Collection; programs: Collection }> {
|
||||
@@ -48,11 +49,10 @@ export class Grabber {
|
||||
config.delay = delay
|
||||
}
|
||||
|
||||
const grabber =
|
||||
process.env.NODE_ENV === 'test' ? new EPGGrabberMock(config) : new EPGGrabber(config)
|
||||
const _programs = await grabber.grab(
|
||||
const _programs = await this.grabber.grab(
|
||||
channel,
|
||||
date,
|
||||
config,
|
||||
(data: GrabCallbackData, error: Error | null) => {
|
||||
const { programs, date } = data
|
||||
|
||||
|
||||
Reference in New Issue
Block a user