From 80b70804ca11ce08873eac9bee0232f7b6846b0d Mon Sep 17 00:00:00 2001 From: David Claeys Date: Wed, 29 May 2024 10:25:21 +0200 Subject: [PATCH] add program icons --- sites/telenet.tv/telenet.tv.config.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sites/telenet.tv/telenet.tv.config.js b/sites/telenet.tv/telenet.tv.config.js index e43267af..3dec8e37 100644 --- a/sites/telenet.tv/telenet.tv.config.js +++ b/sites/telenet.tv/telenet.tv.config.js @@ -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 || {}