mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
add program icons
This commit is contained in:
parent
c7285cadc9
commit
80b70804ca
1 changed files with 8 additions and 1 deletions
|
@ -3,6 +3,7 @@ const dayjs = require('dayjs')
|
|||
|
||||
const API_STATIC_ENDPOINT = 'https://static.spark.telenet.tv/eng/web/epg-service-lite/be'
|
||||
const API_PROD_ENDPOINT = 'https://spark-prod-be.gnp.cloud.telenet.tv/eng/web/linear-service/v2'
|
||||
const API_IMAGE_ENDPOINT = 'https://staticqbr-prod-be.gnp.cloud.telenet.tv/image-service';
|
||||
|
||||
module.exports = {
|
||||
site: 'telenet.tv',
|
||||
|
@ -62,6 +63,7 @@ module.exports = {
|
|||
const detail = await loadProgramDetails(item, channel)
|
||||
programs.push({
|
||||
title: item.title,
|
||||
icon: detail.icon,
|
||||
description: detail.longDescription,
|
||||
category: detail.genres,
|
||||
actors: detail.actors,
|
||||
|
@ -95,7 +97,12 @@ async function loadProgramDetails(item, channel) {
|
|||
const url = `${API_PROD_ENDPOINT}/replayEvent/${item.id}?returnLinearContent=true&language=${channel.lang}`
|
||||
const data = await axios
|
||||
.get(url)
|
||||
.then(r => r.data)
|
||||
.then(r => {
|
||||
var icon = `${API_IMAGE_ENDPOINT}/intent/${item.id}/posterTile`;
|
||||
|
||||
return { icon: icon, ...r.data };
|
||||
|
||||
})
|
||||
.catch(console.log)
|
||||
|
||||
return data || {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue