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

@@ -45,7 +45,7 @@ module.exports = {
title: item.name,
category: item.genres,
description: item.introduce,
icon: parseIcon(item),
image: parseImage(item),
start: start.toJSON(),
stop: stop.toJSON()
})
@@ -79,7 +79,7 @@ module.exports = {
}
}
function parseIcon(item) {
function parseImage(item) {
return item.pictures && item.pictures.length ? item.pictures[0].href : null
}

View File

@@ -35,7 +35,8 @@ it('can parse response', () => {
stop: '2021-11-07T01:00:00.000Z',
title: '24 Portre',
category: 'Yaşam',
icon: 'https://izmottvsc23.tvplus.com.tr:33207/CPS/images/universal/film/program/202111/20211104/35/20211104000026695lh5.jpg',
image:
'https://izmottvsc23.tvplus.com.tr:33207/CPS/images/universal/film/program/202111/20211104/35/20211104000026695lh5.jpg',
description:
'Kendi alanında büyük başarılar elde etmiş insanların kendi ağzından hayat hikayeleri ekrana geliyor.'
}