mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-12 01:50:07 -04:00
wip
This commit is contained in:
parent
3009e0ed1e
commit
d06fa32f9d
4 changed files with 57 additions and 823 deletions
|
@ -65,16 +65,21 @@ async function main() {
|
|||
.then(response => {
|
||||
const channel = request.channel
|
||||
const site = sites[channel.site]
|
||||
const date = request.date
|
||||
|
||||
const programs = site
|
||||
.parser({
|
||||
channel,
|
||||
content: response.data,
|
||||
date: request.date
|
||||
date
|
||||
})
|
||||
.filter(p => p)
|
||||
|
||||
console.log(` ${channel.site} - ${channel.xmltv_id} (${programs.length} programs)`)
|
||||
console.log(
|
||||
` ${channel.site} - ${channel.xmltv_id} - ${date.format('MMM D, YYYY')} (${
|
||||
programs.length
|
||||
} programs)`
|
||||
)
|
||||
|
||||
return programs
|
||||
})
|
||||
|
|
|
@ -47,7 +47,13 @@ utils.convertToXMLTV = function ({ config, channels, programs }) {
|
|||
|
||||
if (start && title) {
|
||||
output += `
|
||||
<programme start="${start}" stop="${stop}" channel="${program.channel}"><title lang="${lang}">${title}</title>`
|
||||
<programme start="${start}"`
|
||||
|
||||
if (stop) {
|
||||
output += ` stop="${stop}"`
|
||||
}
|
||||
|
||||
output += ` channel="${program.channel}"><title lang="${lang}">${title}</title>`
|
||||
|
||||
if (description) {
|
||||
output += `<desc lang="${lang}">${description}</desc>`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue