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

View File

@@ -23,7 +23,7 @@ module.exports = {
programs.push({
title,
description: parseDescription(item),
icon: parseIcon(item),
image: parseImage(item),
start: parseStart(item),
stop: parseStop(item)
})
@@ -55,7 +55,7 @@ function parseDescription(item) {
return item.Content.Description.Summary
}
function parseIcon(item) {
function parseImage(item) {
const image = item.Content.Nodes ? item.Content.Nodes.Items.find(i => i.Kind === 'Image') : null
const path = image ? image.ContentPath : null

View File

@@ -33,7 +33,8 @@ it('can parse response', () => {
title: 'Weekend on the Rocks',
description:
' - «R.E.S.P.E.C.T», lieber Charles Nguela. Der Comedian tourt fleissig durch die Schweiz, macht für uns aber einen Halt, um in der neuen Ausgabe von «Weekend on the Rocks» mit Moderatorin Vania Spescha über die Entertainment-News der Woche zu plaudern.',
icon: 'https://services.sg101.prd.sctv.ch/content/images/tv/broadcast/1221/t1221ddc59247d45_landscape_w1920.webp'
image:
'https://services.sg101.prd.sctv.ch/content/images/tv/broadcast/1221/t1221ddc59247d45_landscape_w1920.webp'
}
])
})