mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-11 17:40:07 -04:00
Merge pull request #701 from mcastellaneta/patch-1
Add support for subcategory in guidatv.sky.it
This commit is contained in:
commit
fe4879dc22
1 changed files with 10 additions and 1 deletions
|
@ -17,7 +17,7 @@ module.exports = {
|
||||||
programs.push({
|
programs.push({
|
||||||
title: item.eventTitle,
|
title: item.eventTitle,
|
||||||
description: item.eventSynopsis,
|
description: item.eventSynopsis,
|
||||||
category: item.content.genre.name,
|
category: parseCategory(item),
|
||||||
season: item.content.seasonNumber || null,
|
season: item.content.seasonNumber || null,
|
||||||
episode: item.content.episodeNumber || null,
|
episode: item.content.episodeNumber || null,
|
||||||
start: parseStart(item),
|
start: parseStart(item),
|
||||||
|
@ -30,6 +30,15 @@ module.exports = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function parseCategory(item) {
|
||||||
|
let category = item.content.genre.name || null;
|
||||||
|
const subcategory = item.content.subgenre.name || null;
|
||||||
|
if(category && subcategory){
|
||||||
|
category += `/${subcategory}`;
|
||||||
|
}
|
||||||
|
return category;
|
||||||
|
}
|
||||||
|
|
||||||
function parseStart(item) {
|
function parseStart(item) {
|
||||||
return item.starttime ? dayjs(item.starttime) : null
|
return item.starttime ? dayjs(item.starttime) : null
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue