mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-11 17:40:07 -04:00
added program genre
This commit is contained in:
parent
259af9879c
commit
f6ff5076ae
1 changed files with 5 additions and 0 deletions
|
@ -52,6 +52,7 @@ module.exports = {
|
||||||
programs.push({
|
programs.push({
|
||||||
title: item.name,
|
title: item.name,
|
||||||
description: item.description,
|
description: item.description,
|
||||||
|
category: parseGenres(item),
|
||||||
season: item.seriesSeason || null,
|
season: item.seriesSeason || null,
|
||||||
episode: item.episodeId || null,
|
episode: item.episodeId || null,
|
||||||
icon: parseIcon(item),
|
icon: parseIcon(item),
|
||||||
|
@ -92,6 +93,10 @@ function parseIcon(item){
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function parseGenres(item){
|
||||||
|
return item.genres.map(i => i.name);
|
||||||
|
}
|
||||||
|
|
||||||
function parseItems(content, channel) {
|
function parseItems(content, channel) {
|
||||||
const json = typeof content === 'string' ? JSON.parse(content) : Array.isArray(content) ? content : []
|
const json = typeof content === 'string' ? JSON.parse(content) : Array.isArray(content) ? content : []
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue