Update scripts

This commit is contained in:
freearhey committed 2026-05-25 13:29:39 +03:00
1 parent b7cd2a1d5a
commit 254458135a
6 files changed
+86 -36

No files matched your search

+5 -1
View File
@@ -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`)