mirror of
https://github.com/iptv-org/epg
synced 2026-05-07 18:07:05 -04:00
Replaces icon with image
This commit is contained in:
@@ -31,7 +31,7 @@ module.exports = {
|
||||
sub_title: details.episode_title,
|
||||
description: details.episode_description || item.description,
|
||||
category: parseCategory(details),
|
||||
icon: parseIcon(details),
|
||||
image: parseImage(details),
|
||||
director: parseList(details.director),
|
||||
actors: parseList(details.actors),
|
||||
writer: parseList(details.script),
|
||||
@@ -70,7 +70,7 @@ function parseList(str) {
|
||||
return typeof str === 'string' ? str.split(', ') : []
|
||||
}
|
||||
|
||||
function parseIcon(details) {
|
||||
function parseImage(details) {
|
||||
const url = new URL(details.image, 'https://programacion-tv.elpais.com/')
|
||||
|
||||
return url.href
|
||||
|
||||
@@ -57,7 +57,7 @@ it('can parse response', async () => {
|
||||
category: 'Ocio-Cultura/Cocina',
|
||||
season: 1,
|
||||
episode: 23,
|
||||
icon: 'https://programacion-tv.elpais.com/imagenes/programas/2099957.jpg'
|
||||
image: 'https://programacion-tv.elpais.com/imagenes/programas/2099957.jpg'
|
||||
}
|
||||
])
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user