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:
@@ -33,7 +33,7 @@ module.exports = {
|
||||
season: parseSeason(item),
|
||||
episode: parseEpisode(item),
|
||||
rating: parseRating(item),
|
||||
icon: parseIcon(item),
|
||||
image: parseImage(item),
|
||||
start: parseTime(item.start_time),
|
||||
stop: parseTime(item.end_time)
|
||||
})
|
||||
@@ -106,7 +106,7 @@ function parseEpisode(item) {
|
||||
function parseTime(time) {
|
||||
return dayjs.tz(time, 'YYYY-MM-DD HH:mm', 'Australia/Sydney')
|
||||
}
|
||||
function parseIcon(item) {
|
||||
function parseImage(item) {
|
||||
return item.image_file
|
||||
? `https://www.abc.net.au/tv/common/images/publicity/${item.image_file}`
|
||||
: null
|
||||
|
||||
@@ -35,7 +35,7 @@ it('can parse response', () => {
|
||||
},
|
||||
season: 22,
|
||||
episode: 4,
|
||||
icon: 'https://www.abc.net.au/tv/common/images/publicity/ZW2178A004S00_460.jpg',
|
||||
image: 'https://www.abc.net.au/tv/common/images/publicity/ZW2178A004S00_460.jpg',
|
||||
start: '2022-12-21T13:46:00.000Z',
|
||||
stop: '2022-12-21T14:44:00.000Z'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user