mirror of
https://github.com/iptv-org/epg
synced 2026-05-09 02:47:00 -04:00
Replaces icon with image
This commit is contained in:
@@ -47,7 +47,7 @@ module.exports = {
|
||||
programs.push({
|
||||
title: item.name,
|
||||
description: item.introduce,
|
||||
icon: parseIcon(item),
|
||||
image: parseImage(item),
|
||||
category: parseCategory(item),
|
||||
start: parseStart(item),
|
||||
stop: parseStop(item)
|
||||
@@ -102,7 +102,7 @@ function parseCategory(item) {
|
||||
: []
|
||||
}
|
||||
|
||||
function parseIcon(item) {
|
||||
function parseImage(item) {
|
||||
if (!Array.isArray(item.pictures) || !item.pictures.length) return null
|
||||
|
||||
return item.pictures[0].href
|
||||
|
||||
@@ -66,7 +66,8 @@ it('can parse response', () => {
|
||||
title: 'Twenty Foot Plus',
|
||||
description:
|
||||
'Die besten Big-Wave-Surfer werden bei ihrer Suche nach der nächsten großen Welle begleitet.',
|
||||
icon: 'http://ngiss.t-online.de/cm1s/media/gracenote/2/4/p24832950_e_h9_aa_2023-06-22T10_12_01.jpg',
|
||||
image:
|
||||
'http://ngiss.t-online.de/cm1s/media/gracenote/2/4/p24832950_e_h9_aa_2023-06-22T10_12_01.jpg',
|
||||
category: ['Sport']
|
||||
}
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user