mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
Update dstv.com.config.js
This commit is contained in:
parent
e1344af3fb
commit
a4da122202
1 changed files with 15 additions and 3 deletions
|
@ -21,9 +21,9 @@ module.exports = {
|
||||||
const details = await loadProgramDetails(item)
|
const details = await loadProgramDetails(item)
|
||||||
programs.push({
|
programs.push({
|
||||||
title: item.Title,
|
title: item.Title,
|
||||||
description: details.Synopsis,
|
description: parseDescription(details),
|
||||||
icon: details.ThumbnailUri,
|
icon: parseIcon(details),
|
||||||
category: details.SubGenres,
|
category: parseCategory(details),
|
||||||
start: parseStart(item),
|
start: parseStart(item),
|
||||||
stop: parseStop(item)
|
stop: parseStop(item)
|
||||||
})
|
})
|
||||||
|
@ -48,6 +48,18 @@ module.exports = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function parseDescription(details) {
|
||||||
|
return details ? details.Synopsis : null
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseIcon(details) {
|
||||||
|
return details ? details.ThumbnailUri : null
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseCategory(details) {
|
||||||
|
return details ? details.SubGenres : null
|
||||||
|
}
|
||||||
|
|
||||||
async function loadProgramDetails(item) {
|
async function loadProgramDetails(item) {
|
||||||
const url = `https://www.dstv.com/umbraco/api/TvGuide/GetProgramme?id=${item.Id}`
|
const url = `https://www.dstv.com/umbraco/api/TvGuide/GetProgramme?id=${item.Id}`
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue