mirror of
https://github.com/iptv-org/iptv
synced 2026-10-27 13:28:26 -04:00
Update scripts
This commit is contained in:
1 parent
b7cd2a1d5a
commit
254458135a
6 files changed
+86
-36
No files matched your search
@@ -5,8 +5,8 @@ import { Storage } from '@freearhey/storage-js'
|
||||
import { STREAMS_DIR } from '../../constants'
|
||||
import { PlaylistParser } from '../../core'
|
||||
import { getStreamInfo } from '../../utils'
|
||||
import { loadData, data } from '../../api'
|
||||
import cliProgress from 'cli-progress'
|
||||
import { loadData } from '../../api'
|
||||
import { eachLimit } from 'async'
|
||||
import path from 'node:path'
|
||||
import os from 'node:os'
|
||||
@@ -44,6 +44,10 @@ async function main() {
|
||||
let files = program.args.length ? program.args : await streamsStorage.list('**/*.m3u')
|
||||
files = files.map((filepath: string) => path.basename(filepath))
|
||||
let 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`)
|
||||
|
||||
|
||||
Reference in new issue
Block a user