Update scripts

This commit is contained in:
freearhey
2025-03-15 07:31:10 +03:00
parent c4efdcfe2c
commit d931903a8d
5 changed files with 217 additions and 4 deletions

View File

@@ -1,8 +1,6 @@
import { Collection, Storage } from '@freearhey/core'
import parser from 'iptv-playlist-parser'
import { Stream } from '../models'
import path from 'path'
import { STREAMS_DIR } from '../constants'
export class PlaylistParser {
storage: Storage
@@ -15,8 +13,7 @@ export class PlaylistParser {
let streams = new Collection()
for (const filepath of files) {
const relativeFilepath = filepath.replace(path.normalize(STREAMS_DIR), '')
const _streams: Collection = await this.parseFile(relativeFilepath)
const _streams: Collection = await this.parseFile(filepath)
streams = streams.concat(_streams)
}