From d957c4d87310a49eca7ca4548a491a8921690938 Mon Sep 17 00:00:00 2001 From: David Claeys Date: Fri, 29 Nov 2024 13:45:15 +0100 Subject: [PATCH] add extra fix and update readme --- README.md | 5 +- fixes/orangetv.es/orangetv.es.channels.xml | 172 +++++++++++++++++++++ fixes/orangetv.es/orangetv.es.config.js | 81 ++++++++++ 3 files changed, 257 insertions(+), 1 deletion(-) create mode 100644 fixes/orangetv.es/orangetv.es.channels.xml create mode 100644 fixes/orangetv.es/orangetv.es.config.js diff --git a/README.md b/README.md index 606f90f..3ed3e76 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,7 @@ This the list of the provided custom fixes : | Provider | Author(s) | Status | |------------------|------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------| | movistarplus.es | [davidclaeysquinones](https://github.com/davidclaeysquinones) | [PR](https://github.com/iptv-org/epg/pull/2440) pending approval | +| orangetv.es | [fraudiay79](https://github.com/fraudiay79) and [davidclaeysquinones](https://github.com/davidclaeysquinones) | PR not submitted | | pickx.be | [davidclaeysquinones](https://github.com/davidclaeysquinones) and [BellezaEmporium](https://github.com/BellezaEmporium) | [PR](https://github.com/iptv-org/epg/pull/2480) pending approval | | telenet.tv | [davidclaeysquinones](https://github.com/davidclaeysquinones) | [PR](https://github.com/iptv-org/epg/pull/2429) merged since commit [fd382db](https://github.com/iptv-org/epg/commit/fd382db08da7a96150928b8dcfef115e29e661d3) | | web.magentatv.de | [klausellus-wallace](https://github.com/klausellus-wallace) | [PR](https://github.com/iptv-org/epg/pull/2458) pending approval | @@ -130,4 +131,6 @@ Sometimes a new version of this image will be bound to the same source commit. T - 1.0.19 [11-27-2024 15:43](https://github.com/iptv-org/epg/commit/e5f0850b3b2e35ed394f00ac68b699eaabc4f0e4) - 1.0.20 - [11-28-2024](https://github.com/iptv-org/epg/commit/da18b70ddb1c3950e5a315411fd9aeaf60b6092c) \ No newline at end of file + [11-28-2024](https://github.com/iptv-org/epg/commit/da18b70ddb1c3950e5a315411fd9aeaf60b6092c) +- 1.0.21 + [11-28-2024](https://github.com/iptv-org/epg/commit/da18b70ddb1c3950e5a315411fd9aeaf60b6092c)
Add orangetv.es \ No newline at end of file diff --git a/fixes/orangetv.es/orangetv.es.channels.xml b/fixes/orangetv.es/orangetv.es.channels.xml new file mode 100644 index 0000000..d7950f7 --- /dev/null +++ b/fixes/orangetv.es/orangetv.es.channels.xml @@ -0,0 +1,172 @@ + + + LA 1 HD + La 2 HD + 24h horas + TDP HD + Clan HD + Antena 3 HD + Cuatro HD + Telecinco HD + laSexta HD + SELEKT + STAR Channel + AMC + AMC Break + AMC CRIME + Warner TV + AXN + Comedy Central + Calle 13 + XTRM + SYFY + Cosmo + Enfamilia + Decasa + CanalCocina + Runtime Series + FDF + Neox + Energy + Atreseries + Divinity + Nova + Canal Hollywood + AXN Movies + Somos + TCM + Sundance TV + Dark + Runtime Cine y Series + Runtime Thriller/Terror + Runtime Acción + Runtime Comedia + Runtime Crimen + Runtime Romance + RunTime Clásico + Cines Verdi TV + Cine Feel Good + Paramount Network + Dreamworks + Bom Cine + DKISS + Ten + Odisea + Mega + TR3CE + DMAX + La otra HD + Boing + Toon Goggles + Nick JR + Disney Junior + Nick + Be Mad TV + Canal Historia + National Geographic + NatGeo Wild + Discovery + NatureTime + 7RM HD + Levante TV + Canal Sur + CanalSur 2 + Andalucía TV + 7 TV Andalucia + TV3 HD + TV3CAT + 3/24 + TV Castellon + 8 Mediterraneo + A punt HD + IB3 HD + RTV Canaria HD + ETB1 HD + ETB2 HD + ETB3 + ETB4 + ETB Basque + TVG HD + TVG2 HD + TPA HD + Televigo + Galicia TV + TV Ceuta + TVR HD + Navarra TV HD + Navarra TV2 + Telemadrid HD + Real Madrid + SEVILLA FC Televisión + Betis TV + M+ Liga de Campeones + M+ Liga de Campeones 2 + M+ Liga de Campeones 3 + M+ Liga de Campeones 4 + M+ Liga de Campeones 5 + M+ Liga de Campeones 6 + M+ Liga de Campeones 7 + M+ Liga de Campeones 8 + M+ Liga de Campeones 9 + M+ Liga de Campeones 10 + M+ Liga de Campeones 11 + M+ Liga de Campeones 12 + M+ Liga de Campeones 13 + M+ Liga de Campeones 14 + M+ Liga de Campeones 15 + M+ Liga de Campeones 16 + M+ Liga de Campeones 17 + M LALIGA TV UHD + M+ LALIGA TV + M+ LALIGA TV 2 + M+ LALIGATV 3 + M+ LALIGATV 4 + LA LIGA TV + DAZN LALIGA + DAZN LALIGA 2 + LALIGATV HYPERMOTION + LALIGATV HYPERMOTION 2 + LALIGATV HYPERMOTION 3 + GOL PLAY + Mezzo HD + MTV 00s + HIT TV + MTV España + MTV Live + Sol Música + Classica HD + Festival 4K + Djazz + iConcerts + MezzoLiveHD + TRACE Latina + TRACE Urban + Caracol TV + EWTN + Gulli + France 2 + France 5 + Trace Sport Stars + TV5MONDE + Qwest TV + Eurosport 1 + Eurosport 2 + Myzen TV + FightSports + Fight Box HD + Gametoon + Euronews + El Toro TV + Motorvision + Esport3 + BBC World HD + CNN + Deutsche Welle + Al Jazeera + Pro TV + Ubeat + OUTtv + ¡BUENVIAJE! + Tennis Channel + Nautical Channel + diff --git a/fixes/orangetv.es/orangetv.es.config.js b/fixes/orangetv.es/orangetv.es.config.js new file mode 100644 index 0000000..a1717ae --- /dev/null +++ b/fixes/orangetv.es/orangetv.es.config.js @@ -0,0 +1,81 @@ +// credit for this fix goes to fraudiay79 and to davidclaeysquinones for their work +// the PR is not submitted since the test suite for this provider needs to be developed +// for now the source code can be found at https://github.com/davidclaeysquinones/epg/tree/orangetv.orange.es + +const dayjs = require('dayjs') + +const API_PROGRAM_ENDPOINT = 'https://epg.orangetv.orange.es/epg/Smartphone_Android/1_PRO' +const API_CHANNEL_ENDPOINT = 'https://pc.orangetv.orange.es/pc/api/rtv/v1/GetChannelList?bouquet_id=1&model_external_id=PC&filter_unsupported_channels=false&client=json' +const API_IMAGE_ENDPOINT = 'https://pc.orangetv.orange.es/pc/api/rtv/v1/images' + + + +module.exports = { + site: 'orangetv.es', + days: 2, + request: { + cache: { + ttl: 60 * 60 * 1000 // 1 hour + } + }, + url({ date }) { + return `${API_PROGRAM_ENDPOINT}/${date.format('YYYYMMDD')}_8h_1.json` + }, + parser: function ({ content, channel }) { + let programs = [] + const items = parseItems(content, channel) + items.forEach(item => { + programs.push({ + title: item.name, + description: item.description, + season: item.seriesSeason || null, + episode: item.episodeId || null, + icon: parseIcon(item), + start: dayjs.utc(item.startDate) || null, + stop: dayjs.utc(item.endDate) || null, + }) + }) + + return programs + }, + async channels() { + const axios = require('axios') + const data = await axios + .get(API_CHANNEL_ENDPOINT) + .then(r => r.data) + .catch(console.log) + return data.response.map(item => { + return { + lang: 'es', + name: item.name, + site_id: item.externalChannelId + } + }) + } +} + +function parseIcon(item){ + + if(item.attachments.length > 0){ + const cover = item.attachments.find(i => i.name === "COVER" || i.name === "cover") + + if(cover) + { + return `${API_IMAGE_ENDPOINT}${cover.value}`; + } + } + + return '' +} + +function parseItems(content, channel) { + const json = typeof content === 'string' ? JSON.parse(content) : content + + const channelData = json.find(i => i.channelExternalId == channel.site_id); + + if(!channelData) + return []; + + + return channelData.programs; +} \ No newline at end of file