mirror of
https://github.com/iptv-org/iptv.git
synced 2025-05-11 17:40:03 -04:00
Update generate.ts
This commit is contained in:
parent
b2c44a3373
commit
0739182d6d
1 changed files with 4 additions and 3 deletions
|
@ -36,8 +36,10 @@ async function main() {
|
|||
const subdivisions = new Collection(subdivisionsContent).map(data => new Subdivision(data))
|
||||
|
||||
logger.info('loading streams...')
|
||||
const streams = await loadStreams({ channels, categories, languages })
|
||||
logger.info(`found ${streams.count()} streams`)
|
||||
let streams = await loadStreams({ channels, categories, languages })
|
||||
let totalStreams = streams.count()
|
||||
streams = streams.uniqBy((stream: Stream) => stream.channel || _.uniqueId())
|
||||
logger.info(`found ${totalStreams} streams (including ${streams.count()} unique)`)
|
||||
|
||||
const generatorsLogger = new Logger({
|
||||
stream: await new Storage(LOGS_DIR).createStream(`generators.log`)
|
||||
|
@ -104,7 +106,6 @@ async function loadStreams({
|
|||
|
||||
streams = streams
|
||||
.orderBy([(stream: Stream) => stream.channel, (stream: Stream) => stream.url], ['asc', 'asc'])
|
||||
.uniqBy((stream: Stream) => stream.channel || _.uniqueId())
|
||||
.map((stream: Stream) => {
|
||||
const channel: Channel | undefined = groupedChannels.get(stream.channel)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue