mirror of
https://github.com/iptv-org/iptv
synced 2025-12-17 19:07:37 -05:00
Install @freearhey/core
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user