Update chaines-tv.orange.fr.config.js

This commit is contained in:
Ismaël Moret 2024-12-19 15:36:31 +01:00 committed by GitHub
parent 7096beec7d
commit 5431648dbf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -20,8 +20,8 @@ module.exports = {
subTitle: item.season?.serie?.title, subTitle: item.season?.serie?.title,
category: item.genreDetailed, category: item.genreDetailed,
description: item.synopsis, description: item.synopsis,
season: item.season?.number, season: parseSeason(item),
episode: item.season?.episodeNumber, episode: parseEpisode(item),
image: parseImage(item), image: parseImage(item),
start: start.toJSON(), start: start.toJSON(),
stop: stop.toJSON() stop: stop.toJSON()
@ -64,6 +64,14 @@ function parseStop(item, start) {
return start.add(item.duration, 's') return start.add(item.duration, 's')
} }
function parseSeason(item) {
return item.season?.number
}
function parseEpisode(item) {
return item.episodeNumber
}
function parseItems(content, channel) { function parseItems(content, channel) {
const data = JSON.parse(content) const data = JSON.parse(content)