|
|
@ -32,6 +32,7 @@ async function main() {
|
|
|
|
|
|
|
|
|
|
|
|
const buffer = {}
|
|
|
|
const buffer = {}
|
|
|
|
const fileLog = []
|
|
|
|
const fileLog = []
|
|
|
|
|
|
|
|
try {
|
|
|
|
const playlist = await parser.parsePlaylist(filepath)
|
|
|
|
const playlist = await parser.parsePlaylist(filepath)
|
|
|
|
for (const item of playlist.items) {
|
|
|
|
for (const item of playlist.items) {
|
|
|
|
if (item.tvg.id && !api.channels.find({ id: item.tvg.id })) {
|
|
|
|
if (item.tvg.id && !api.channels.find({ id: item.tvg.id })) {
|
|
|
@ -66,6 +67,13 @@ async function main() {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
} catch (err) {
|
|
|
|
|
|
|
|
fileLog.push({
|
|
|
|
|
|
|
|
type: 'error',
|
|
|
|
|
|
|
|
line: 0,
|
|
|
|
|
|
|
|
message: err.message.toLowerCase()
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (fileLog.length) {
|
|
|
|
if (fileLog.length) {
|
|
|
|
logger.info(`\n${chalk.underline(filepath)}`)
|
|
|
|
logger.info(`\n${chalk.underline(filepath)}`)
|
|
|
|