mirror of
https://github.com/iptv-org/iptv
synced 2025-12-17 02:47:33 -05:00
Update scripts
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user