mirror of
https://github.com/iptv-org/epg
synced 2026-04-30 14:36:58 -04:00
Replaces icon with image
This commit is contained in:
@@ -27,7 +27,7 @@ module.exports = {
|
||||
programs.push({
|
||||
title: item.title,
|
||||
description: item.description,
|
||||
icon: parseIcon(item),
|
||||
image: parseImage(item),
|
||||
start,
|
||||
stop
|
||||
})
|
||||
@@ -55,7 +55,7 @@ function parseStart(item) {
|
||||
return dayjs.tz(item.datetime, 'YYYY-MM-DD HH:mm:ss', 'Asia/Nicosia')
|
||||
}
|
||||
|
||||
function parseIcon(item) {
|
||||
function parseImage(item) {
|
||||
return item.mediaItems.length ? item.mediaItems[0].CdnUrl : null
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,8 @@ it('can parse response', () => {
|
||||
stop: '2021-11-17T06:10:00.000Z',
|
||||
title: 'Δεσμοί Αίματος',
|
||||
description: 'Θρίλερ Μυστηρίου',
|
||||
icon: 'http://cache-forthnet.secure.footprint.net/linear/3/0/305608_COMMOBLOOX_GUIDE_STILL.jpg'
|
||||
image:
|
||||
'http://cache-forthnet.secure.footprint.net/linear/3/0/305608_COMMOBLOOX_GUIDE_STILL.jpg'
|
||||
}
|
||||
])
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user