mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-12 01:50:07 -04:00
Reinstate what was PR made for
This commit is contained in:
parent
a32f80a0ff
commit
d3649ee1a8
1 changed files with 4 additions and 14 deletions
|
@ -21,20 +21,10 @@ module.exports = {
|
||||||
if (!data.events) return programs
|
if (!data.events) return programs
|
||||||
|
|
||||||
data.events.forEach(item => {
|
data.events.forEach(item => {
|
||||||
if (item.title && item.startTime && item.endTime) {
|
if (item.title && item.startTime && item.duration) {
|
||||||
const start = dayjs
|
const start = parseStart(item, date)
|
||||||
.utc(item.startTime, 'HH:mm')
|
const duration = parseInt(item.duration)
|
||||||
.set('D', date.get('D'))
|
const stop = start.add(duration, 'm')
|
||||||
.set('M', date.get('M'))
|
|
||||||
.set('y', date.get('y'))
|
|
||||||
.toString()
|
|
||||||
|
|
||||||
const stop = dayjs
|
|
||||||
.utc(item.endTime, 'HH:mm')
|
|
||||||
.set('D', date.get('D'))
|
|
||||||
.set('M', date.get('M'))
|
|
||||||
.set('y', date.get('y'))
|
|
||||||
.toString()
|
|
||||||
|
|
||||||
programs.push({
|
programs.push({
|
||||||
title: item.displayTitle || item.title,
|
title: item.displayTitle || item.title,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue