Install @freearhey/core

This commit is contained in:
freearhey
2023-09-22 05:17:22 +03:00
parent dad8935915
commit f8902e4e45
39 changed files with 141 additions and 420 deletions

View File

@@ -1,6 +1,6 @@
import { Collection, Storage } from '@freearhey/core'
import parser from 'iptv-playlist-parser'
import { Stream } from '../models'
import { Collection, Storage } from './'
import path from 'path'
import { STREAMS_DIR } from '../constants'
@@ -26,7 +26,7 @@ export class PlaylistParser {
async parseFile(filepath: string): Promise<Collection> {
const streams = new Collection()
const content = await this.storage.read(filepath)
const content = await this.storage.load(filepath)
const parsed: parser.Playlist = parser.parse(content)
parsed.items.forEach((item: parser.PlaylistItem) => {