Replaces icon with image

This commit is contained in:
freearhey 2024-06-24 16:49:35 +03:00
parent 0eaff54a31
commit bb6771f539
170 changed files with 428 additions and 351 deletions

View file

@ -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

View file

@ -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'
}