mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
Update update-guides.js
This commit is contained in:
parent
5eeb23340f
commit
fcd61e9d29
1 changed files with 6 additions and 5 deletions
|
@ -1,4 +1,5 @@
|
|||
const { db, logger, file, xml } = require('../core')
|
||||
const { db, logger, file } = require('../core')
|
||||
const grabber = require('epg-grabber')
|
||||
const _ = require('lodash')
|
||||
|
||||
const DB_DIR = process.env.DB_DIR || 'scripts/database'
|
||||
|
@ -32,7 +33,7 @@ async function generateGuides() {
|
|||
}
|
||||
)
|
||||
|
||||
const output = xml.create({ channels: groupChannels, programs: groupProgs })
|
||||
const output = grabber.convertToXMLTV({ channels: groupChannels, programs: groupProgs })
|
||||
|
||||
logger.info(`Creating "${filepath}"...`)
|
||||
await file.create(filepath, output)
|
||||
|
@ -67,9 +68,9 @@ async function loadPrograms() {
|
|||
|
||||
programs = programs.map(program => {
|
||||
return {
|
||||
title: program.title ? [{ lang: program.lang, value: program.title }] : [],
|
||||
description: program.description ? [{ lang: program.lang, value: program.description }] : [],
|
||||
categories: program.category ? [{ lang: program.lang, value: program.category }] : [],
|
||||
title: program.title,
|
||||
description: program.description,
|
||||
categories: program.category,
|
||||
icon: program.icon,
|
||||
channel: program.channel,
|
||||
lang: program.lang,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue