mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-09 08:30:06 -04:00
Update sky.com.config.js
This commit is contained in:
parent
145ed8c831
commit
15c51c1d7d
1 changed files with 4 additions and 5 deletions
|
@ -3,6 +3,7 @@ const dayjs = require('dayjs')
|
|||
const utc = require('dayjs/plugin/utc')
|
||||
const doFetch = require('@ntlab/sfetch')
|
||||
const debug = require('debug')('site:sky.com')
|
||||
const _ = require('lodash')
|
||||
|
||||
dayjs.extend(utc)
|
||||
|
||||
|
@ -25,7 +26,7 @@ module.exports = {
|
|||
.filter(schedule => schedule.sid === channel.site_id)
|
||||
.forEach(schedule => {
|
||||
if (Array.isArray(schedule.events)) {
|
||||
schedule.events.forEach(event => {
|
||||
_.sortBy(schedule.events, 'st').forEach(event => {
|
||||
const start = dayjs.utc(event.st * 1000)
|
||||
if (start.isSame(date, 'd')) {
|
||||
const image = `https://images.metadata.sky.com/pd-image/${event.programmeuuid}/16-9/640`
|
||||
|
@ -36,10 +37,8 @@ module.exports = {
|
|||
episode: event.episodenumber,
|
||||
start,
|
||||
stop: start.add(event.d, 's'),
|
||||
icon: {
|
||||
src: image
|
||||
},
|
||||
image,
|
||||
icon: image,
|
||||
image
|
||||
})
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue