Replaces icon with image

This commit is contained in:
freearhey
2024-06-24 16:49:35 +03:00
parent 0eaff54a31
commit bb6771f539
170 changed files with 428 additions and 351 deletions
@@ -24,7 +24,7 @@ module.exports = {
start: parseStart(item),
stop: parseStop(item),
url: parseURL(item),
icon: parseIcon(item)
image: parseImage(item)
})
})
@@ -79,7 +79,7 @@ function parseURL(item) {
return item.content.url ? `https://guidatv.sky.it${item.content.url}` : null
}
function parseIcon(item) {
function parseImage(item) {
const cover = item.content.imagesMap ? item.content.imagesMap.find(i => i.key === 'cover') : null
return cover && cover.img && cover.img.url ? `https://guidatv.sky.it${cover.img.url}` : null