This commit is contained in:
freearhey
2021-03-12 01:23:14 +03:00
parent a24cbb3543
commit 3009e0ed1e
8 changed files with 874 additions and 47 deletions

View File

@@ -66,11 +66,13 @@ async function main() {
const channel = request.channel
const site = sites[channel.site]
const programs = site.parser({
channel,
content: response.data,
date: request.date
})
const programs = site
.parser({
channel,
content: response.data,
date: request.date
})
.filter(p => p)
console.log(` ${channel.site} - ${channel.xmltv_id} (${programs.length} programs)`)

View File

@@ -32,6 +32,8 @@ utils.convertToXMLTV = function ({ config, channels, programs }) {
}
for (let program of programs) {
if (!program) continue
const start = program.start
? dayjs.tz(program.start, config.timezone).format('YYYYMMDDHHmmss ZZ')
: ''