mirror of
https://github.com/iptv-org/epg
synced 2025-12-17 02:47:02 -05:00
Update scripts
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { parseChannels } from 'epg-grabber'
|
||||
import { Storage, Collection } from '@freearhey/core'
|
||||
import { Storage } from '@freearhey/core'
|
||||
import { ChannelList } from '../models'
|
||||
|
||||
type ChannelsParserProps = {
|
||||
storage: Storage
|
||||
@@ -12,13 +13,10 @@ export class ChannelsParser {
|
||||
this.storage = storage
|
||||
}
|
||||
|
||||
async parse(filepath: string) {
|
||||
let parsedChannels = new Collection()
|
||||
|
||||
async parse(filepath: string): Promise<ChannelList> {
|
||||
const content = await this.storage.load(filepath)
|
||||
const channels = parseChannels(content)
|
||||
parsedChannels = parsedChannels.concat(new Collection(channels))
|
||||
const parsed = parseChannels(content)
|
||||
|
||||
return parsedChannels
|
||||
return new ChannelList({ channels: parsed })
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user