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

@@ -30,7 +30,7 @@ module.exports = {
actors: item.program.actor,
start: parseStart(item),
stop: parseStop(item),
icon: parseIcon(item)
image: parseImage(item)
})
})
@@ -63,7 +63,7 @@ module.exports = {
}
}
function parseIcon(item) {
function parseImage(item) {
return item.program.image.length ? `https://image.tving.com${item.program.image[0].url}` : null
}

View File

@@ -30,7 +30,7 @@ it('can parse response', () => {
expect(results[0]).toMatchObject({
title: '외계+인 1부',
description: '외계+인 1부',
icon: 'https://image.tving.com/upload/cms/caip/CAIP0200/P001661154.jpg',
image: 'https://image.tving.com/upload/cms/caip/CAIP0200/P001661154.jpg',
date: 2022,
categories: [],
directors: ['최동훈'],