mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 09:00:07 -04:00
Update mediaset.it.config.js
Fixes empty guide issue
This commit is contained in:
parent
6e3afe0e94
commit
d026d2a002
1 changed files with 3 additions and 2 deletions
|
@ -20,9 +20,10 @@ module.exports = {
|
||||||
},
|
},
|
||||||
parser: function ({ content, date }) {
|
parser: function ({ content, date }) {
|
||||||
const programs = []
|
const programs = []
|
||||||
if (!content.events) return programs
|
const data = JSON.parse(content)
|
||||||
|
if (!data.events) return programs
|
||||||
|
|
||||||
content.events.forEach(item => {
|
data.events.forEach(item => {
|
||||||
if (item.title && item.startTime && item.endTime) {
|
if (item.title && item.startTime && item.endTime) {
|
||||||
const start = dayjs
|
const start = dayjs
|
||||||
.utc(item.startTime, 'HH:mm')
|
.utc(item.startTime, 'HH:mm')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue