mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-09 16:40:07 -04:00
Update create-queue.js
This commit is contained in:
parent
1da2821900
commit
0c87e23011
2 changed files with 4 additions and 3 deletions
|
@ -10,10 +10,11 @@ const options = program
|
|||
256
|
||||
)
|
||||
.option('--days <days>', 'Number of days for which to grab the program', parser.parseNumber, 1)
|
||||
.option('--channels <channels>', 'Set path to channels.xml file', 'sites/**/*.channels.xml')
|
||||
.parse(process.argv)
|
||||
.opts()
|
||||
|
||||
const CHANNELS_PATH = process.env.CHANNELS_PATH || 'sites/**/*.channels.xml'
|
||||
|
||||
async function main() {
|
||||
logger.info('Starting...')
|
||||
logger.info(`Number of clusters: ${options.maxClusters}`)
|
||||
|
@ -30,7 +31,7 @@ async function createQueue() {
|
|||
|
||||
let queue = {}
|
||||
|
||||
const files = await file.list(options.channels)
|
||||
const files = await file.list(CHANNELS_PATH)
|
||||
const utcDate = date.getUTC()
|
||||
const dates = Array.from({ length: options.days }, (_, i) => utcDate.add(i, 'd'))
|
||||
for (const filepath of files) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue