From cd089138011bd9b03369fc8a35e92f5469bd7bac Mon Sep 17 00:00:00 2001 From: CutterXYZ Date: Sat, 1 Nov 2025 02:13:19 +0100 Subject: [PATCH] Added icon on tv.sfr.fr --- sites/tv.sfr.fr/tv.sfr.fr.config.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sites/tv.sfr.fr/tv.sfr.fr.config.js b/sites/tv.sfr.fr/tv.sfr.fr.config.js index f6c2b64d..4ab8e296 100644 --- a/sites/tv.sfr.fr/tv.sfr.fr.config.js +++ b/sites/tv.sfr.fr/tv.sfr.fr.config.js @@ -24,6 +24,7 @@ module.exports = { subTitle: item.subTitle || null, category: item.genre, description: item.longSynopsis, + icon: getIconURL(item.images), images: item.images.map(img => img.url), season: item.seasonNumber || null, episode: item.episodeNumber || null @@ -63,3 +64,12 @@ function parseItems(content, channel) { return [] } } + +function getIconURL(images) { + let icon = images.find(icon => icon.type === 'landscape' && icon.withTitle === true ) || + images.find(icon => icon.type === 'landscape' ) || + images[0] + + if (icon) + return icon.url +}