Update index.js
This commit is contained in:
		
							parent
							
								
									a3e4479dfc
								
							
						
					
					
						commit
						4de8e8a6ad
					
				| 
						 | 
					@ -20,12 +20,13 @@ async function main() {
 | 
				
			||||||
  const config = utils.loadConfig(options.config)
 | 
					  const config = utils.loadConfig(options.config)
 | 
				
			||||||
  if (options.debug) console.log(config)
 | 
					  if (options.debug) console.log(config)
 | 
				
			||||||
  const client = utils.createHttpClient(config)
 | 
					  const client = utils.createHttpClient(config)
 | 
				
			||||||
  const channels = utils.parseChannels(config, config.channels)
 | 
					  const channels = utils.parseChannels(config.channels)
 | 
				
			||||||
  const utcDate = utils.getUTCDate()
 | 
					  const utcDate = utils.getUTCDate()
 | 
				
			||||||
  const dates = Array.from({ length: config.days }, (_, i) => utcDate.add(i, 'd'))
 | 
					  const dates = Array.from({ length: config.days }, (_, i) => utcDate.add(i, 'd'))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const queue = []
 | 
					  const queue = []
 | 
				
			||||||
  channels.forEach(channel => {
 | 
					  channels.forEach(channel => {
 | 
				
			||||||
 | 
					    channel.logo = config.logo ? config.logo(channel) : null
 | 
				
			||||||
    dates.forEach(date => {
 | 
					    dates.forEach(date => {
 | 
				
			||||||
      queue.push({ date, channel })
 | 
					      queue.push({ date, channel })
 | 
				
			||||||
    })
 | 
					    })
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue