mirror of
https://github.com/iptv-org/epg
synced 2026-05-08 10:27:06 -04:00
Replaces icon with image
This commit is contained in:
@@ -18,7 +18,7 @@ module.exports = {
|
||||
items.forEach(item => {
|
||||
programs.push({
|
||||
title: item.name,
|
||||
icon: parseIcon(item),
|
||||
image: parseImage(item),
|
||||
start: dayjs(item.startAt),
|
||||
stop: dayjs(item.endAt)
|
||||
})
|
||||
@@ -42,7 +42,7 @@ module.exports = {
|
||||
}
|
||||
}
|
||||
|
||||
function parseIcon(item) {
|
||||
function parseImage(item) {
|
||||
return item.images.webGuideItemLarge
|
||||
? `https://inet-static.mw.elion.ee${item.images.webGuideItemLarge}`
|
||||
: null
|
||||
|
||||
@@ -43,7 +43,8 @@ it('can parse response', () => {
|
||||
start: '2021-11-19T22:05:00.000Z',
|
||||
stop: '2021-11-19T22:55:00.000Z',
|
||||
title: 'Inimjaht',
|
||||
icon: 'https://inet-static.mw.elion.ee/resized/ri93Qj4OLXXvg7QAsUOcKMnIb3g=/570x330/filters:format(jpeg)/inet-static.mw.elion.ee/epg_images/9/b/17e48b3966e65c02.jpg'
|
||||
image:
|
||||
'https://inet-static.mw.elion.ee/resized/ri93Qj4OLXXvg7QAsUOcKMnIb3g=/570x330/filters:format(jpeg)/inet-static.mw.elion.ee/epg_images/9/b/17e48b3966e65c02.jpg'
|
||||
}
|
||||
])
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user