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

@ -35,7 +35,7 @@ module.exports = {
url: parseURL(item),
start,
stop,
icon: parseIcon(item)
image: parseImage(item)
})
})
@ -47,7 +47,7 @@ function parseStart(item, date) {
return dayjs.tz(`${date.format('YYYY-MM-DD')} ${item.hour}`, 'YYYY-MM-DD HH:mm', 'Europe/Rome')
}
function parseIcon(item) {
function parseImage(item) {
let cover = null
if (item.image) {
cover = `https://www.raiplay.it${item.image}`

View file

@ -37,7 +37,7 @@ it('can parse response', () => {
season: '3',
episode: '5',
sub_title: 'La prima volta',
icon: 'https://www.raiplay.it/dl/img/2020/03/09/1583748471860_dddddd.jpg',
image: 'https://www.raiplay.it/dl/img/2020/03/09/1583748471860_dddddd.jpg',
url: 'https://www.raiplay.it/dirette/rai2/The-Good-Doctor-S3E5---La-prima-volta-2f81030d-803b-456a-9ea5-40233234fd9d.html'
}
])