mirror of
https://github.com/iptv-org/epg
synced 2026-09-19 07:26:25 -04:00
added program genre
This commit is contained in:
@@ -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 : []
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user