MCPcopy
hub / github.com/iptv-org/iptv / parse

Method parse

scripts/core/playlistParser.ts:17–29  ·  view source on GitHub ↗
(files: string[])

Source from the content-addressed store, hash-verified

15 }
16
17 async parse(files: string[]): Promise<Collection<Stream>> {
18 const parsed = new Collection<Stream>()
19
20 for (const filepath of files) {
21 if (!this.storage.existsSync(filepath)) continue
22 const _parsed: Collection<Stream> = await this.parseFile(filepath)
23 _parsed.forEach((item: Stream) => {
24 parsed.add(item)
25 })
26 }
27
28 return parsed
29 }
30
31 async parseFile(filepath: string): Promise<Collection<Stream>> {
32 const content = await this.storage.load(filepath)

Callers 8

mainFunction · 0.95
mainFunction · 0.95
loadStreamsFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
parseFileMethod · 0.45

Calls 1

parseFileMethod · 0.95

Tested by

no test coverage detected