Update guidatv.sky.it.config.js

Add support for url
This commit is contained in:
Michele Castellaneta 2022-05-06 12:57:19 +02:00 committed by GitHub
parent dad910a3b2
commit 1a246455b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,6 +22,7 @@ module.exports = {
episode: item.content.episodeNumber || null,
start: parseStart(item),
stop: parseStop(item),
url: parseURL(item),
icon: parseIcon(item)
})
})
@ -47,6 +48,10 @@ function parseStop(item) {
return item.endtime ? dayjs(item.endtime) : null
}
function parseURL(item) {
return item.content.url ? `https://guidatv.sky.it${item.content.url}` : null
}
function parseIcon(item) {
const cover = item.content.imagesMap ? item.content.imagesMap.find(i => i.key === 'cover') : null