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:
@@ -38,7 +38,7 @@ module.exports = {
|
||||
programs.push({
|
||||
title: item.name,
|
||||
description: item.description,
|
||||
icon: parseIcon(item),
|
||||
image: parseImage(item),
|
||||
start,
|
||||
stop
|
||||
})
|
||||
@@ -48,7 +48,7 @@ module.exports = {
|
||||
}
|
||||
}
|
||||
|
||||
function parseIcon(item) {
|
||||
function parseImage(item) {
|
||||
const last = item.image.pop()
|
||||
if (!last) return null
|
||||
return last.src
|
||||
|
||||
@@ -32,7 +32,7 @@ it('can parse response', () => {
|
||||
stop: '2022-12-03T00:00:00.000Z',
|
||||
title: 'Telejornal Madeira',
|
||||
description: 'Informação de proximidade. De confiança!',
|
||||
icon: 'https://cdn-images.rtp.pt/EPG/imagens/15790_43438_8820.png?w=384&h=216'
|
||||
image: 'https://cdn-images.rtp.pt/EPG/imagens/15790_43438_8820.png?w=384&h=216'
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user