mirror of
https://github.com/iptv-org/epg
synced 2025-12-16 10:26:41 -05:00
Replaces icon with image
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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'
|
||||
}
|
||||
])
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user