Merge pull request #898 from Arkina1234/patch-17

Patch 17
This commit is contained in:
Aleksandr Statciuk 2022-07-01 20:31:11 +03:00 committed by GitHub
commit 36b820e2f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View file

@ -18,6 +18,7 @@ module.exports = {
items.forEach(item => { items.forEach(item => {
programs.push({ programs.push({
title: parseTitle(item), title: parseTitle(item),
sub_title: parseSubtitle(item),
description: parseDescription(item), description: parseDescription(item),
category: parseCategory(item), category: parseCategory(item),
season: parseSeason(item), season: parseSeason(item),
@ -99,6 +100,10 @@ function parseTitle(item) {
return item.program.title return item.program.title
} }
function parseSubtitle(item) {
return item.program.episodeTitle
}
function parseDescription(item) { function parseDescription(item) {
return item.program.longDescription return item.program.longDescription
} }

View file

@ -34,6 +34,7 @@ it('can parse response', () => {
start: '2022-01-20T00:00:00.000Z', start: '2022-01-20T00:00:00.000Z',
stop: '2022-01-20T00:30:00.000Z', stop: '2022-01-20T00:30:00.000Z',
title: 'Reflect and Renew With Kevin Naidoo', title: 'Reflect and Renew With Kevin Naidoo',
sub_title: 'Empowerment',
description: `Kevin demonstrates a meditation and yoga practice to reclaim his courage and confidence.`, description: `Kevin demonstrates a meditation and yoga practice to reclaim his courage and confidence.`,
category: ['Health'], category: ['Health'],
season: 1, season: 1,
@ -44,6 +45,7 @@ it('can parse response', () => {
start: '2022-01-20T00:30:00.000Z', start: '2022-01-20T00:30:00.000Z',
stop: '2022-01-20T01:00:00.000Z', stop: '2022-01-20T01:00:00.000Z',
title: 'Four Senses', title: 'Four Senses',
sub_title: 'Sizzled & Seared',
description: `Everything is sizzled and seared as chef Corbin Tomaszeski joins Christine and Carl in the kitchen.`, description: `Everything is sizzled and seared as chef Corbin Tomaszeski joins Christine and Carl in the kitchen.`,
category: ['House/garden'], category: ['House/garden'],
icon: 'https://tvtv.us/gn/i/assets/p10464580_b_v7_aa.jpg?w=240&h=360' icon: 'https://tvtv.us/gn/i/assets/p10464580_b_v7_aa.jpg?w=240&h=360'