mirror of
https://github.com/iptv-org/epg
synced 2026-04-23 11:07:03 -04:00
Update scripts
This commit is contained in:
19
scripts/core/configLoader.ts
Normal file
19
scripts/core/configLoader.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { SiteConfig } from 'epg-grabber'
|
||||
import _ from 'lodash'
|
||||
|
||||
export class ConfigLoader {
|
||||
async load(filepath: string): Promise<SiteConfig> {
|
||||
const config = (await import(filepath)).default
|
||||
|
||||
return _.merge(
|
||||
{
|
||||
delay: 0,
|
||||
maxConnections: 1,
|
||||
request: {
|
||||
timeout: 30000
|
||||
}
|
||||
},
|
||||
config
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user