mirror of
https://github.com/iptv-org/epg
synced 2025-12-17 19:06:58 -05:00
Merge pull request #701 from mcastellaneta/patch-1
Add support for subcategory in guidatv.sky.it
This commit is contained in:
@@ -17,7 +17,7 @@ module.exports = {
|
||||
programs.push({
|
||||
title: item.eventTitle,
|
||||
description: item.eventSynopsis,
|
||||
category: item.content.genre.name,
|
||||
category: parseCategory(item),
|
||||
season: item.content.seasonNumber || null,
|
||||
episode: item.content.episodeNumber || null,
|
||||
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) {
|
||||
return item.starttime ? dayjs(item.starttime) : null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user