mirror of
https://github.com/iptv-org/iptv.git
synced 2025-05-12 10:00:05 -04:00
Install @freearhey/core
This commit is contained in:
parent
03208a262a
commit
4c92b4ecb1
39 changed files with 141 additions and 420 deletions
|
@ -1,4 +1,5 @@
|
|||
import { Storage, HTMLTable, Collection, LogParser, LogItem, File } from '../core'
|
||||
import { Storage, Collection, File } from '@freearhey/core'
|
||||
import { HTMLTable, LogParser, LogItem } from '../core'
|
||||
import { Country, Subdivision } from '../models'
|
||||
import { DATA_DIR, LOGS_DIR, README_DIR } from '../constants'
|
||||
import { Table } from './table'
|
||||
|
@ -17,7 +18,7 @@ export class CountryTable implements Table {
|
|||
|
||||
const parser = new LogParser()
|
||||
const logsStorage = new Storage(LOGS_DIR)
|
||||
const generatorsLog = await logsStorage.read('generators.log')
|
||||
const generatorsLog = await logsStorage.load('generators.log')
|
||||
|
||||
let data = new Collection()
|
||||
parser
|
||||
|
@ -28,7 +29,7 @@ export class CountryTable implements Table {
|
|||
)
|
||||
.forEach((logItem: LogItem) => {
|
||||
const file = new File(logItem.filepath)
|
||||
const code = file.getFilename().toUpperCase()
|
||||
const code = file.name().toUpperCase()
|
||||
const [countryCode, subdivisionCode] = code.split('-') || ['', '']
|
||||
|
||||
if (subdivisionCode) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue