mirror of
https://github.com/iptv-org/epg
synced 2025-12-16 02:16:40 -05:00
Filter out repeated schedule events from sky.com.
Signed-off-by: Toha <tohenk@yahoo.com>
This commit is contained in:
@@ -18,7 +18,7 @@ module.exports = {
|
||||
channel.site_id
|
||||
}`
|
||||
},
|
||||
parser({ content, channel }) {
|
||||
parser({ content, channel, date }) {
|
||||
const programs = []
|
||||
if (content) {
|
||||
const items = JSON.parse(content) || null
|
||||
@@ -30,15 +30,16 @@ module.exports = {
|
||||
schedule.events
|
||||
.forEach(event => {
|
||||
const start = dayjs.utc(event.st * 1000)
|
||||
const stop = start.add(event.d, 's')
|
||||
programs.push({
|
||||
title: event.t,
|
||||
description: event.sy,
|
||||
season: event.seasonnumber,
|
||||
episode: event.episodenumber,
|
||||
start,
|
||||
stop
|
||||
})
|
||||
if (start.isSame(date, 'd')) {
|
||||
programs.push({
|
||||
title: event.t,
|
||||
description: event.sy,
|
||||
season: event.seasonnumber,
|
||||
episode: event.episodenumber,
|
||||
start,
|
||||
stop: start.add(event.d, 's')
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user