mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
Merge branch 'master' of https://github.com/iptv-org/epg
This commit is contained in:
commit
e5bc5fb9c4
2 changed files with 18 additions and 0 deletions
|
@ -23,6 +23,9 @@ module.exports = {
|
|||
category: parseCategory(item),
|
||||
season: parseSeason(item),
|
||||
episode: parseEpisode(item),
|
||||
directors: parseDirectors(item),
|
||||
actors: parseActors(item),
|
||||
date: parseDate(item),
|
||||
start: parseStart(item),
|
||||
stop: parseStop(item),
|
||||
icon: parseIcon(item)
|
||||
|
@ -122,6 +125,18 @@ function parseEpisode(item) {
|
|||
return item.program.episodeNum || null
|
||||
}
|
||||
|
||||
function parseDirectors(item) {
|
||||
return item.program.directors || []
|
||||
}
|
||||
|
||||
function parseDate(item) {
|
||||
return item.program.origAirDate
|
||||
}
|
||||
|
||||
function parseActors(item) {
|
||||
return item.program.topCast || []
|
||||
}
|
||||
|
||||
function parseIcon(item) {
|
||||
return item.program.preferredImage && item.program.preferredImage.uri
|
||||
? `https://tvtv.us/gn/i/${item.program.preferredImage.uri}`
|
||||
|
|
|
@ -40,6 +40,7 @@ it('can parse response', () => {
|
|||
category: ['Health'],
|
||||
season: 1,
|
||||
episode: 6,
|
||||
date: '2019-04-20',
|
||||
icon: 'https://tvtv.us/gn/i/assets/p16640522_b_v9_aa.jpg?w=240&h=360'
|
||||
},
|
||||
{
|
||||
|
@ -49,6 +50,8 @@ it('can parse response', () => {
|
|||
sub_title: 'Sizzled & Seared',
|
||||
description: `Everything is sizzled and seared as chef Corbin Tomaszeski joins Christine and Carl in the kitchen.`,
|
||||
category: ['House/garden'],
|
||||
actors: ['Carl Heinrich','Christine Ha'],
|
||||
date: '2016-01-14',
|
||||
icon: 'https://tvtv.us/gn/i/assets/p10464580_b_v7_aa.jpg?w=240&h=360'
|
||||
}
|
||||
])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue