diff --git a/sites/chaines-tv.orange.fr/chaines-tv.orange.fr.channels.xml b/sites/chaines-tv.orange.fr/chaines-tv.orange.fr.channels.xml index c2b57d21..42f32567 100644 --- a/sites/chaines-tv.orange.fr/chaines-tv.orange.fr.channels.xml +++ b/sites/chaines-tv.orange.fr/chaines-tv.orange.fr.channels.xml @@ -65,7 +65,7 @@ FRANCE 24 Espagnol CARTOONITO SQOOL TV - CANAL+BOX OFFICE + CANAL+BOX OFFICE TVMONACO DAZN 1 TRACE URBAN @@ -195,7 +195,7 @@ BOOMERANG +1 CANAL J CANAL+ - CANAL+CINEMA(S) + CANAL+CINEMA(S) CANAL+DOCS CANAL+GRAND ECRAN CANAL+kids diff --git a/sites/chaines-tv.orange.fr/chaines-tv.orange.fr.config.js b/sites/chaines-tv.orange.fr/chaines-tv.orange.fr.config.js index 74fa5f20..a6ca1f82 100644 --- a/sites/chaines-tv.orange.fr/chaines-tv.orange.fr.config.js +++ b/sites/chaines-tv.orange.fr/chaines-tv.orange.fr.config.js @@ -9,7 +9,7 @@ module.exports = { .add(1, 'd') .valueOf()}&after=${channel.site_id}&limit=1` }, - async parser({ content, channel }) { + parser: function ({ content, channel }) { let programs = [] const items = parseItems(content, channel) @@ -20,7 +20,7 @@ module.exports = { let itemDetails = null if (url) { try { - const response = await axios.get(url, {}, { + const response = axios.get(url, {}, { headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' @@ -74,7 +74,7 @@ module.exports = { } function parseDetailURL(item) { - return item.links && item.links.length ? item.links[0].href : null + return item?.links && item?.links.length ? item?.links[0]?.href : null } function parseDirectors(itemDetails) { diff --git a/sites/chaines-tv.orange.fr/chaines-tv.orange.fr.test.js b/sites/chaines-tv.orange.fr/chaines-tv.orange.fr.test.js index 9a07e69f..13126659 100644 --- a/sites/chaines-tv.orange.fr/chaines-tv.orange.fr.test.js +++ b/sites/chaines-tv.orange.fr/chaines-tv.orange.fr.test.js @@ -11,7 +11,7 @@ const channel = { xmltv_id: 'TF1.fr' } const content = - '{"192":[{"id":1635062528017,"programType":"EPISODE","title":"Tête de liste","channelId":"192","channelZappingNumber":11,"covers":[{"format":"RATIO_16_9","url":"https://proxymedia.woopic.com/340/p/169_EMI_9697669.jpg"},{"format":"RATIO_4_3","url":"https://proxymedia.woopic.com/340/p/43_EMI_9697669.jpg"}],"diffusionDate":1636328100,"duration":2700,"csa":2,"synopsis":"Un tueur en série prend un plaisir pervers à prévenir les autorités de Tallahassee avant chaque nouveau meurtre. Rossi apprend le décès d\'un de ses vieux amis.","languageVersion":"VM","hearingImpaired":true,"audioDescription":false,"season":{"number":10,"episodesCount":23,"serie":{"title":"Esprits criminels"}},"episodeNumber":12,"definition":"SD","links":[{"rel":"SELF","href":"https://rp-live.orange.fr/live-webapp/v3/applications/STB4PC/programs/1635062528017"}],"dayPart":"OTHER","catchupId":null,"genre":"Série","genreDetailed":"Série Suspense"}]}' + '{"192":[{"id":1635062528017,"programType":"EPISODE","title":"Tête de liste","channelId":"192","channelZappingNumber":11,"covers":[{"format":"RATIO_16_9","url":"https://proxymedia.woopic.com/340/p/169_EMI_9697669.jpg"},{"format":"RATIO_4_3","url":"https://proxymedia.woopic.com/340/p/43_EMI_9697669.jpg"}],"diffusionDate":1636328100,"duration":2700,"csa":2,"synopsis":"Un tueur en série prend un plaisir pervers à prévenir les autorités de Tallahassee avant chaque nouveau meurtre. Rossi apprend le décès d\'un de ses vieux amis.","languageVersion":"VM","hearingImpaired":true,"audioDescription":false,"season":{"number":10,"episodesCount":23,"serie":{"title":"Esprits criminels"}},"episodeNumber":12,"definition":"SD","dayPart":"OTHER","catchupId":null,"genre":"Série","genreDetailed":"Série Suspense"}]}' it('can generate valid url', () => { const result = url({ channel, date })