mirror of
https://github.com/iptv-org/epg
synced 2025-12-17 19:06:58 -05:00
Merge branch 'master' into add-proximusmwc.be
This commit is contained in:
@@ -33,7 +33,7 @@ async function main() {
|
|||||||
|
|
||||||
await file.write(outputFilepath, output)
|
await file.write(outputFilepath, output)
|
||||||
|
|
||||||
logger.info(`File '${output}' successfully saved`)
|
logger.info(`File '${outputFilepath}' successfully saved`)
|
||||||
}
|
}
|
||||||
|
|
||||||
main()
|
main()
|
||||||
|
|||||||
@@ -16,6 +16,10 @@ class API {
|
|||||||
find(query) {
|
find(query) {
|
||||||
return _.find(this.collection, query)
|
return _.find(this.collection, query)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
all() {
|
||||||
|
return this.collection
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const api = {}
|
const api = {}
|
||||||
|
|||||||
@@ -48,6 +48,10 @@ file.write = function (filepath, data = '') {
|
|||||||
return fs.writeFile(path.resolve(filepath), data, { encoding: 'utf8' }).catch(console.error)
|
return fs.writeFile(path.resolve(filepath), data, { encoding: 'utf8' }).catch(console.error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
file.writeSync = function (filepath, data = '') {
|
||||||
|
return fs.writeFileSync(path.resolve(filepath), data, { encoding: 'utf8' })
|
||||||
|
}
|
||||||
|
|
||||||
file.clear = async function (filepath) {
|
file.clear = async function (filepath) {
|
||||||
if (await file.exists(filepath)) return file.write(filepath, '')
|
if (await file.exists(filepath)) return file.write(filepath, '')
|
||||||
return true
|
return true
|
||||||
|
|||||||
@@ -6,9 +6,8 @@ const parser = {}
|
|||||||
|
|
||||||
parser.parseChannels = async function (filepath) {
|
parser.parseChannels = async function (filepath) {
|
||||||
const content = await file.read(filepath)
|
const content = await file.read(filepath)
|
||||||
const channels = grabber.parseChannels(content)
|
|
||||||
|
|
||||||
return channels
|
return grabber.parseChannels(content)
|
||||||
}
|
}
|
||||||
|
|
||||||
parser.parseLogs = async function (filepath) {
|
parser.parseLogs = async function (filepath) {
|
||||||
|
|||||||
Reference in New Issue
Block a user