mirror of
https://github.com/iptv-org/iptv
synced 2026-09-09 13:27:58 -04:00
Update test.ts
This commit is contained in:
@@ -5,8 +5,8 @@ import { Logger, Collection } from '@freearhey/core'
|
|||||||
import { program, OptionValues } from 'commander'
|
import { program, OptionValues } from 'commander'
|
||||||
import { Storage } from '@freearhey/storage-js'
|
import { Storage } from '@freearhey/storage-js'
|
||||||
import { Playlist, Stream } from '../../models'
|
import { Playlist, Stream } from '../../models'
|
||||||
|
import { loadData, data } from '../../api'
|
||||||
import { truncate } from '../../utils'
|
import { truncate } from '../../utils'
|
||||||
import { loadData } from '../../api'
|
|
||||||
import { eachLimit } from 'async'
|
import { eachLimit } from 'async'
|
||||||
import dns from 'node:dns'
|
import dns from 'node:dns'
|
||||||
import chalk from 'chalk'
|
import chalk from 'chalk'
|
||||||
@@ -70,6 +70,10 @@ async function main() {
|
|||||||
})
|
})
|
||||||
const files = program.args.length ? program.args : await rootStorage.list(`${STREAMS_DIR}/*.m3u`)
|
const files = program.args.length ? program.args : await rootStorage.list(`${STREAMS_DIR}/*.m3u`)
|
||||||
streams = await parser.parse(files)
|
streams = await parser.parse(files)
|
||||||
|
streams = streams.map((stream: Stream) => {
|
||||||
|
stream.setGuides(data.guidesGroupedByStreamId.get(stream.getId()))
|
||||||
|
return stream
|
||||||
|
})
|
||||||
|
|
||||||
logger.info(`found ${streams.count()} streams`)
|
logger.info(`found ${streams.count()} streams`)
|
||||||
if (streams.count() > LIVE_UPDATE_MAX_STREAMS) isLiveUpdateEnabled = false
|
if (streams.count() > LIVE_UPDATE_MAX_STREAMS) isLiveUpdateEnabled = false
|
||||||
|
|||||||
Reference in New Issue
Block a user