Compare commits
53 Commits
Author | SHA1 | Date | |
---|---|---|---|
6b723e1776 | |||
8aacebad42 | |||
d388307b85 | |||
e04ec220e3 | |||
6ff94a3848 | |||
1f885bbd1c | |||
e99af0bc2b | |||
2f86d79697 | |||
0e72cce51f | |||
2b7b095419 | |||
bb828fd0eb | |||
d957c4d873 | |||
613da613c4 | |||
9c5e4ad69b | |||
8e448d6c57 | |||
31eb8abddf | |||
6acb07ed4e | |||
02133f0692 | |||
6543f2ce6c | |||
e7b49898df | |||
99c7d0e2c6 | |||
a46995b833 | |||
1a73bc2b25 | |||
f15b5c36da | |||
ac6aed6aa4 | |||
c0905a30f0 | |||
8555fae94a | |||
a4575ccf18 | |||
abc9f19ac3 | |||
5e40ec15af | |||
aa9ddceb06 | |||
8f58693ef5 | |||
fd12d6508f | |||
b078fd94ae | |||
30fdcd055d | |||
14526d29e2 | |||
7dd9fab7e6 | |||
65c94b6585 | |||
c95f6abf4f | |||
26db08b189 | |||
57501829c1 | |||
a7e52a2952 | |||
2da2e0e4ab | |||
f55db2a2f2 | |||
9dbc13ee24 | |||
bf767c9878 | |||
12b1343bd4 | |||
0e70d67740 | |||
6e16e71ab5 | |||
f66ad104af | |||
df87aec731 | |||
6c8efd06c6 | |||
d197c843ee |
@ -11,7 +11,7 @@ jobs:
|
||||
working-directory: ${{ GITHUB_WORKSPACE }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Docker
|
||||
run: |
|
||||
echo "Checking docker installation"
|
||||
@ -23,17 +23,24 @@ jobs:
|
||||
fi
|
||||
- name: Set up Docker Buildx
|
||||
uses: https://github.com/docker/setup-buildx-action@v3
|
||||
- name: Docker login
|
||||
- name: Login to Gitea container registry
|
||||
uses: https://github.com/docker/login-action@v3
|
||||
with:
|
||||
registry: git.claeyscloud.com
|
||||
username: nologin
|
||||
password: ${{ secrets.PACKAGE_TOKEN }}
|
||||
- name: Login to DockerHub container registry
|
||||
uses: https://github.com/docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME}}
|
||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: git.claeyscloud.com/david/epg-info
|
||||
images: |
|
||||
davidquinonescl/epg-info
|
||||
git.claeyscloud.com/david/epg-info
|
||||
tags: |
|
||||
type=semver,pattern={{raw}}
|
||||
type=sha
|
||||
|
1
.github/FUNDING.yml
vendored
Normal file
1
.github/FUNDING.yml
vendored
Normal file
@ -0,0 +1 @@
|
||||
github: davidclaeysquinones
|
22
Dockerfile
22
Dockerfile
@ -2,25 +2,27 @@ FROM node:21-alpine
|
||||
ARG GIT_REPO=https://github.com/iptv-org/epg.git
|
||||
ARG GIT_BRANCH=master
|
||||
ENV CRON_SCHEDULE="0 0,12 * * *"
|
||||
ENV API_URL="https://iptv-org.github.io/api"
|
||||
ENV DAYS=14
|
||||
ENV MAX_CONNECTIONS=10
|
||||
ENV ENABLE_FIXES=false
|
||||
ARG BIN_FOLDER=/bin
|
||||
ARG EPG_FOLDER=epg
|
||||
ARG FIXES_FOLDER_ARG=fixes
|
||||
ARG START_SCRIPT_ARG=$BIN_FOLDER/$EPG_FOLDER/start.sh
|
||||
ENV WORKDIR=${BIN_FOLDER}/${EPG_FOLDER}
|
||||
ENV FIXES_FOLDER=$FIXES_FOLDER_ARG
|
||||
ENV START_SCRIPT=$START_SCRIPT_ARG
|
||||
COPY channels.xml /config/channels.xml
|
||||
ADD $FIXES_FOLDER /fixes
|
||||
RUN apk update \
|
||||
&& apk upgrade --available \
|
||||
&& apk add curl \
|
||||
&& apk add git \
|
||||
&& apk add tzdata \
|
||||
&& apk add bash \
|
||||
&& apk add curl git tzdata bash \
|
||||
&& npm install -g npm@latest \
|
||||
&& npm install pm2 -g \
|
||||
&& mkdir $(echo "${BIN_FOLDER}/${EPG_FOLDER}") -p \
|
||||
&& git -C $(echo "${BIN_FOLDER}") clone --depth 1 -b $(echo "${GIT_BRANCH} ${GIT_REPO}") \
|
||||
&& cd $WORKDIR cat && npm install && npm update \
|
||||
&& cd $WORKDIR && npm install && npm update \
|
||||
&& rm .eslintrc.json \
|
||||
&& rm -rf .github \
|
||||
&& rm -rf .git \
|
||||
@ -33,6 +35,13 @@ RUN apk update \
|
||||
&& rm sites/**/readme.md \
|
||||
&& rm -rf sites/**/__data__ \
|
||||
&& rm sites/**/**.test.js \
|
||||
&& rm -rf node_modules/**/.package-lock.json \
|
||||
&& rm -rf node_modules/**/.tsconfig.json \
|
||||
&& rm -rf node_modules/**/.tsconfig.tsbuildinfo.json \
|
||||
&& rm -rf node_modules/**/.github \
|
||||
&& rm -rf node_modules/**/docs \
|
||||
&& rm -rf node_modules/**/LICENSE \
|
||||
&& rm -rf node_modules/**/**.md \
|
||||
&& ln -s /config/channels.xml $(echo "${WORKDIR}/channels.xml") \
|
||||
&& mkdir /public
|
||||
COPY start.sh $WORKDIR
|
||||
@ -40,5 +49,6 @@ COPY serve.json $WORKDIR
|
||||
RUN chmod +x "$START_SCRIPT" \
|
||||
&& apk del git curl \
|
||||
&& rm -rf /var/cache/apk/*
|
||||
ENTRYPOINT bash $START_SCRIPT chron-schedule="$CRON_SCHEDULE" work-dir="$WORKDIR" days="$DAYS" max_connections="$MAX_CONNECTIONS"
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
ENTRYPOINT bash $START_SCRIPT chron-schedule="$CRON_SCHEDULE" work-dir="$WORKDIR" days="$DAYS" max_connections="$MAX_CONNECTIONS" enable_fixes="$ENABLE_FIXES" api_url="$API_URL"
|
||||
EXPOSE 3000
|
9
LICENSE
Normal file
9
LICENSE
Normal file
@ -0,0 +1,9 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2024 David Claeys
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
97
README.md
97
README.md
@ -17,6 +17,7 @@ The `pm2` and `serve` packages are used in order to run the application in the c
|
||||
|
||||
### Paths
|
||||
|
||||
#### Channels file
|
||||
An example `channels.xml` is included by default in the image.<br>
|
||||
```xml
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
@ -28,13 +29,36 @@ An example `channels.xml` is included by default in the image.<br>
|
||||
However if you want to configure your own channels you need to provide your own configuration file.<br>
|
||||
You can do this by creating a mapping in the `/config` folder.
|
||||
|
||||
#### Custom fixes
|
||||
|
||||
Through the `ENABLE_FIXES` variable custom provider fixes can be applied to the container.
|
||||
By default some fixes are available. These fixes have been validated before being added to this repo.
|
||||
However this option is disabled by default since you might only want to run the unmodified source.
|
||||
If you have suggestions or a problem with them please submit an issue.
|
||||
|
||||
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) merged since commit [296d616](https://github.com/iptv-org/epg/commit/296d6162ecbeb1b3c3e392845187d30624d50aa2) |
|
||||
| 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) merged since commit [61afe09](https://github.com/iptv-org/epg/commit/61afe090b6e7892cc5426457d960e9452222f885) |
|
||||
|
||||
If for some reason you want to include your own provider fixes this is possible by creation a mapping in the `/fixes` folder.<br>
|
||||
The expected structure is */fixes/`provider_name`/`provider_name`.config.js*.<br>
|
||||
It is recommended that you take existing provider code as a base for your customisations.
|
||||
|
||||
### Environment Variables
|
||||
|
||||
| Variable | Description | Default |
|
||||
|-------------------------------|----------------------------------------------------------------------------|------------------|
|
||||
| CRON_SCHEDULE | CRON expression describing the recurrence for epg retrieval. | `0 0,12 * * *` |
|
||||
| DAYS | Describes the desired amount of days in the future for for epg retrieval. | 14 |
|
||||
| MAX_CONNECTIONS | The maximum amount of parallel connections that can be established | 10 |
|
||||
| Variable | Description | Default |
|
||||
|-------------------------------|----------------------------------------------------------------------------|----------------------------------|
|
||||
| CRON_SCHEDULE | CRON expression describing the recurrence for epg retrieval. | `0 0,12 * * *` |
|
||||
| DAYS | Describes the desired amount of days in the future for for epg retrieval. | 14 |
|
||||
| MAX_CONNECTIONS | The maximum amount of parallel connections that can be established | 10 |
|
||||
| ENABLE_FIXES | Some fixes to providers take a long time to be merged into the main branch.<br>When this option is enabled some of these fixes will also be included.<br>The source code for these fixes can be seen under the `fixes` folder.<br> Recreate the container when changing this variable in order for it to take effect | false |
|
||||
| API_URL | The endpoint where channel information will be grabbed | `https://iptv-org.github.io/api` |
|
||||
|
||||
### Compose file
|
||||
|
||||
@ -43,7 +67,8 @@ version: '3.3'
|
||||
services:
|
||||
epg:
|
||||
image: git.claeyscloud.com/david/epg-info:latest
|
||||
#image: image: git.claeyscloud.com/david/epg-info:latest:latest
|
||||
#image: ghcr.io/davidclaeysquinones/epg-info:latest
|
||||
#image: davidquinonescl/epg-info:latest
|
||||
volumes:
|
||||
# add a mapping in order to add the channels file
|
||||
- /docker/epg:/config
|
||||
@ -52,12 +77,68 @@ services:
|
||||
environment:
|
||||
# specify the time zone for the server
|
||||
- TZ=Etc/UTC
|
||||
# uncomment the underlying line if you want to enable custom fixes
|
||||
#- ENABLE_FIXES=true
|
||||
restart: unless-stopped
|
||||
```
|
||||
|
||||
### Versions
|
||||
|
||||
- 1.0.0
|
||||
This image is bound to the content of the [iptv-org/epg](https://github.com/iptv-org/epg) repository. In the underlying list you can see to which commit each version of the docker image is bound.
|
||||
|
||||
Normally when a change is made in the source repository the documentation is updated and a new tag is created in this repository. This is completely normal since the source repository is only cloned during the build process of the docker image.
|
||||
|
||||
Sometimes a new version of this image will be bound to the same source commit. This will happen when improvements are made to the image.
|
||||
|
||||
- 1.0.0
|
||||
[08-01-2024](https://github.com/iptv-org/epg/commit/793c74ca397504fc2afc8fbfa998e0b8e4ca45d9)
|
||||
- 1.0.1
|
||||
- 1.0.1
|
||||
[08-14-2024](https://github.com/iptv-org/epg/commit/270e85cfae6f0f691c2e6ab7ce511d60fd687565)
|
||||
- 1.0.2
|
||||
[09-07-2024](https://github.com/iptv-org/epg/commit/4e3b06a86e225cdd1b9362a683e6770fb68ff28f)
|
||||
- 1.0.3
|
||||
[09-14-2024](https://github.com/iptv-org/epg/commit/c69f3c93b1123ddf0fecc62c7067fced59ae4e99)
|
||||
- 1.0.4
|
||||
[09-30-2024](https://github.com/iptv-org/epg/commit/d90c7a54b941238cb92391b33d80a75e746d3002)
|
||||
- 1.0.5
|
||||
[10-02-2024](https://github.com/iptv-org/epg/commit/713dbf60a1cb9623ffcab6ab370ee9a78b32102b)
|
||||
- 1.0.6
|
||||
[10-02-2024](https://github.com/iptv-org/epg/commit/713dbf60a1cb9623ffcab6ab370ee9a78b32102b)<br>Adds possibility to enable custom fixes
|
||||
- 1.0.7
|
||||
[10-02-2024](https://github.com/iptv-org/epg/commit/713dbf60a1cb9623ffcab6ab370ee9a78b32102b)<br>Adds improvement to the docker image size
|
||||
- 1.0.8
|
||||
[10-10-2024](https://github.com/iptv-org/epg/commit/2241bc261fd37b8b16e036a0b61167030a5ce2e6)
|
||||
- 1.0.9
|
||||
[10-12-2024](https://github.com/iptv-org/epg/commit/fd382db08da7a96150928b8dcfef115e29e661d3)
|
||||
- 1.0.10
|
||||
[10-14-2024 12:50](https://github.com/iptv-org/epg/commit/a3e7661f95103cbee4bcb78bd483396680e9abfc)
|
||||
- 1.0.11
|
||||
[10-14-2024 17:34](https://github.com/iptv-org/epg/commit/7610f7b9f5cc1ccab8d17f3408a95d31b36ace7c)
|
||||
- 1.0.12
|
||||
[10-14-2024](https://github.com/iptv-org/epg/commit/7610f7b9f5cc1ccab8d17f3408a95d31b36ace7c)<br>Fix Pickx.be url
|
||||
- 1.0.13
|
||||
[10-14-2024](https://github.com/iptv-org/epg/commit/7610f7b9f5cc1ccab8d17f3408a95d31b36ace7c)<br>Add custom fix for web.magentatv.de
|
||||
- 1.0.14
|
||||
[10-14-2024](https://github.com/iptv-org/epg/commit/7610f7b9f5cc1ccab8d17f3408a95d31b36ace7c)<br>Change fix for movistarplus.es in order to work with new API
|
||||
- 1.0.15
|
||||
[11-26-2024](https://github.com/iptv-org/epg/commit/d15911006e163262c0c7f267deae28160c0d7a8f)<br>Add option to customize channel endpoint
|
||||
- 1.0.16
|
||||
[11-26-2024](https://github.com/iptv-org/epg/commit/d15911006e163262c0c7f267deae28160c0d7a8f)<br>Fix icons for movistarplus.es
|
||||
- 1.0.17
|
||||
[11-26-2024](https://github.com/iptv-org/epg/commit/d15911006e163262c0c7f267deae28160c0d7a8f)<br>Update fix for pickx.be
|
||||
- 1.0.18
|
||||
[11-27-2024 01:51](https://github.com/iptv-org/epg/commit/78dad4cfb4fc16f078c3b44b5534779c7c645b6b)
|
||||
- 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)
|
||||
- 1.0.21
|
||||
[11-28-2024](https://github.com/iptv-org/epg/commit/da18b70ddb1c3950e5a315411fd9aeaf60b6092c)<br>Add orangetv.es
|
||||
- 1.0.22
|
||||
[11-30-2024](https://github.com/iptv-org/epg/commit/1883338c0aee9909ac4567312b25701d10a765f2)
|
||||
- 1.0.23
|
||||
[12-02-2024](https://github.com/iptv-org/epg/commit/296d6162ecbeb1b3c3e392845187d30624d50aa2)
|
||||
- 1.0.24
|
||||
[12-02-2024](https://github.com/iptv-org/epg/commit/296d6162ecbeb1b3c3e392845187d30624d50aa2)<br>Fix for movistarplus.es channel grabber
|
||||
- 1.0.25
|
||||
[12-04-2024](https://github.com/iptv-org/epg/commit/864e0ac2c4761d926b203a85a382a4bdc87fbc17)
|
107
fixes/movistarplus.es/movistarplus.es.config.js
Normal file
107
fixes/movistarplus.es/movistarplus.es.config.js
Normal file
@ -0,0 +1,107 @@
|
||||
const { DateTime } = require('luxon')
|
||||
|
||||
const API_PROGRAM_ENDPOINT = 'https://comunicacion.movistarplus.es'
|
||||
const API_IMAGE_ENDPOINT = 'https://www.movistarplus.es/recorte/n/externov';
|
||||
|
||||
module.exports = {
|
||||
site: 'movistarplus.es',
|
||||
days: 2,
|
||||
url: function ({ channel, date }) {
|
||||
return `${API_PROGRAM_ENDPOINT}/wp-admin/admin-ajax.php`
|
||||
},
|
||||
request: {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
Origin: API_PROGRAM_ENDPOINT,
|
||||
Referer: `${API_PROGRAM_ENDPOINT}/programacion/`,
|
||||
"Content-Type" : 'application/x-www-form-urlencoded; charset=UTF-8',
|
||||
},
|
||||
data: function ({ channel, date }) {
|
||||
return {
|
||||
action: 'getProgramation',
|
||||
day: date.format('YYYY-MM-DD'),
|
||||
"channels[]": channel.site_id,
|
||||
};
|
||||
},
|
||||
},
|
||||
parser({ content, channel, date }) {
|
||||
let programs = []
|
||||
let items = parseItems(content, channel);
|
||||
if (!items.length) return programs;
|
||||
|
||||
items.forEach(item => {
|
||||
let startTime = DateTime.fromFormat(
|
||||
`${item.f_evento_rejilla}`,
|
||||
'yyyy-MM-dd HH:mm:ss',
|
||||
{ zone: 'Europe/Madrid' }
|
||||
).toUTC();
|
||||
|
||||
let stopTime = DateTime.fromFormat(
|
||||
`${item.f_fin_evento_rejilla}`,
|
||||
'yyyy-MM-dd HH:mm:ss',
|
||||
{ zone: 'Europe/Madrid' }
|
||||
).toUTC()
|
||||
|
||||
// Adjust stop time if it's on the next day
|
||||
if (stopTime < startTime) {
|
||||
stopTime = stopTime.plus({ days: 1 });
|
||||
}
|
||||
|
||||
programs.push({
|
||||
title: item.des_evento_rejilla,
|
||||
icon: parseIcon(item, channel),
|
||||
category: item.des_genero,
|
||||
start: startTime,
|
||||
stop: stopTime,
|
||||
})
|
||||
})
|
||||
|
||||
return programs
|
||||
},
|
||||
async channels() {
|
||||
const axios = require('axios')
|
||||
//const dayjs = require('dayjs')
|
||||
const data = await axios
|
||||
.post(`${API_PROGRAM_ENDPOINT}/wp-admin/admin-ajax.php`,
|
||||
{
|
||||
action: 'getChannels',
|
||||
},
|
||||
{
|
||||
headers: {
|
||||
Origin: API_PROGRAM_ENDPOINT,
|
||||
Referer: `${API_PROGRAM_ENDPOINT}/programacion/`,
|
||||
"Content-Type" : 'application/x-www-form-urlencoded; charset=UTF-8',
|
||||
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36 Edg/79.0.309.71'
|
||||
}
|
||||
}
|
||||
)
|
||||
.then(r => r.data)
|
||||
.catch(console.log)
|
||||
|
||||
return Object.values(data).map(item => {
|
||||
return {
|
||||
lang: 'es',
|
||||
site_id: item.cod_cadena_tv,
|
||||
name: item.des_cadena_tv
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function parseIcon(item, channel) {
|
||||
if(item.cod_elemento_emision)
|
||||
{
|
||||
return `${API_IMAGE_ENDPOINT}/M${channel.site_id}P${item.cod_elemento_emision}`
|
||||
}
|
||||
|
||||
return ''
|
||||
}
|
||||
|
||||
function parseItems(content, channel) {
|
||||
const json = typeof content === 'string' ? JSON.parse(content) : content;
|
||||
const data = json.channelsProgram;
|
||||
|
||||
if (data.length !== 1) return [];
|
||||
return data[0];
|
||||
}
|
172
fixes/orangetv.es/orangetv.es.channels.xml
Normal file
172
fixes/orangetv.es/orangetv.es.channels.xml
Normal file
@ -0,0 +1,172 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<channels>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="La1.es" site_id="1010">LA 1 HD</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="La2.es" site_id="1062">La 2 HD</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="24Horas.es" site_id="12051">24 Horas</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="Teledeporte.es" site_id="1063">TDP HD</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="Clan.es" site_id="1064">Clan HD</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="Antena3.es" site_id="1011">Antena 3 HD</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="Cuatro.es" site_id="1012">Cuatro HD</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="Telecinco.es" site_id="1013">Telecinco HD</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="LaSexta.es" site_id="1014">laSexta HD</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="Selekt.es" site_id="11045">SELEKT</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="StarChannelSpain.es" site_id="11001">STAR Channel</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="AMC.es" site_id="11011">AMC</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="AMCBreak.es" site_id="11009">AMC Break</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="AMCCrime.es" site_id="11042">AMC CRIME</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="WarnerTV.es" site_id="11007">Warner TV</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="AXN.es" site_id="11002">AXN</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="ComedyCentral.es" site_id="11005">Comedy Central</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="Calle13Universal.es" site_id="11003">Calle 13</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="XTRM.es" site_id="12057">XTRM</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="Syfy.es" site_id="11004">SYFY</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="COSMO.es" site_id="11006">Cosmo</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="Enfamilia.es" site_id="11063">Enfamilia</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="Decasa.es" site_id="11027">Decasa</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="CanalCocina.es" site_id="11020">CanalCocina</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="RuntimeSeries.es" site_id="11093">Runtime Series</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="FactoriadeFiccion.es" site_id="1032">FDF</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="Neox.es" site_id="1027">Neox</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="Energy.es" site_id="1030">Energy</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="Atreseries.es" site_id="1042">Atreseries</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="Divinity.es" site_id="1034">Divinity</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="Nova.es" site_id="1028">Nova</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="CanalHollywood.es" site_id="11010">Canal Hollywood</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="AXNMovies.es" site_id="11008">AXN Movies</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="Somos.es" site_id="11029">Somos</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="TCM.es" site_id="11012">TCM</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="SundanceTV.es" site_id="11052">Sundance TV</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="Dark.es" site_id="11053">Dark</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="RuntimeCineSeries.es" site_id="1089">Runtime Cine y Series</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="RuntimeCineTerror.es" site_id="11091">Runtime Thriller/Terror</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="RuntimeAccion.es" site_id="11094">Runtime Acción</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="RuntimeComedia.es" site_id="11092">Runtime Comedia</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="RuntimeCrimen.es" site_id="11095">Runtime Crimen</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="RuntimeRomance.es" site_id="11096">Runtime Romance</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="RunTimeClasico.es" site_id="11097">RunTime Clásico</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="CinesVerdiTV.es" site_id="11098">Cines Verdi TV</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="CineFeelGood.es" site_id="11099">Cine Feel Good</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="ParamountNetwork.es" site_id="12032">Paramount Network</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="DreamWorksChannel.es" site_id="1085">Dreamworks</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="BomCine.es" site_id="2063">Bom Cine</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="DKISS.es" site_id="1044">DKISS</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="TEN.es" site_id="12054">Ten</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="Odisea.es" site_id="11018">Odisea</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="Mega.es" site_id="1016">Mega</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="Trece.es" site_id="1017">TR3CE</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="DMAX.es" site_id="1018">DMAX</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="LaOtra.es" site_id="2061">La otra HD</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="Boing.es" site_id="1021">Boing</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="ToonGogglesenEspanol.us" site_id="11100">Toon Goggles</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="NickJr.es" site_id="11055">Nick JR</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="DisneyJunior.es" site_id="11015">Disney Junior</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="Nickelodeon.es" site_id="11016">Nick</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="BeMad.es" site_id="1043">Be Mad TV</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="Historia.es" site_id="11019">Canal Historia</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="NationalGeographic.es" site_id="11017">National Geographic</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="NationalGeographicWild.es" site_id="1008">NatGeo Wild</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="DiscoveryChannel.es" site_id="1039">Discovery</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="NatureTime.es" site_id="1084">NatureTime</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="La7.es" site_id="2011">7RM HD</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="LevanteTV.es" site_id="2070">Levante TV</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="CanalSur.es" site_id="1035">Canal Sur</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="CanalSur2.es" site_id="2022">CanalSur 2</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="CanalSurAndalucia.es" site_id="2031">Andalucía TV</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="7TVAndalucia.e" site_id="2065">7 TV Andalucia</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="TV3.es" site_id="2008">TV3 HD</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="TV3CAT.es" site_id="1036">TV3CAT</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="324.es" site_id="2050">3/24</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="" site_id="2067">TV Castellon</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="La8Mediterraneo.es" site_id="2062">8 Mediterraneo</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="APunt.es" site_id="2057">A punt HD</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="IB3.es" site_id="2013">IB3 HD</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="TelevisionCanaria.es" site_id="2059">RTV Canaria HD</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="ETB1.es" site_id="2014">ETB1 HD</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="ETB2.es" site_id="1037">ETB2 HD</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="ETB3.es" site_id="2032">ETB3</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="ETB4.es" site_id="2037">ETB4</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="ETBBasque.es" site_id="1037">ETB Basque</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="GaliciaTVEuropa.es" site_id="2052">TVG HD</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="TVG2.es" site_id="2053">TVG2 HD</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="TPA7.es" site_id="2009">TPA HD</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="TeleVigo.es" site_id="2068">Televigo</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="GaliciaTVEuropa.es" site_id="1038">Galicia TV</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="CeutaTV.es" site_id="2002">TV Ceuta</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="TVR.es" site_id="2055">TVR HD</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="NavarraTV.es" site_id="2060">Navarra TV HD</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="" site_id="2029">Navarra TV2</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="Telemadrid.es" site_id="12050">Telemadrid HD</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="RealMadridTV.es" site_id="12052">Real Madrid</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="SevillaFCTV.es" site_id="2081">SEVILLA FC Televisión</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="BetisTV.es" site_id="1019">Betis TV</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="LigadeCampeonesporMovistarPlusPlus.es" site_id="1023">M+ Liga de Campeones</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="LigadeCampeones1porMovistarPlusPlus.es" site_id="1050">M+ Liga de Campeones 2</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="LigadeCampeones2porMovistarPlusPlus.es" site_id="1051">M+ Liga de Campeones 3</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="LigadeCampeones3porMovistarPlusPlus.es" site_id="1052">M+ Liga de Campeones 4</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="LigadeCampeones4porMovistarPlusPlus.es" site_id="1053">M+ Liga de Campeones 5</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="LigadeCampeones5porMovistarPlusPlus.es" site_id="1054">M+ Liga de Campeones 6</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="LigadeCampeones6porMovistarPlusPlus.es" site_id="1055">M+ Liga de Campeones 7</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="LigadeCampeones7porMovistarPlusPlus.es" site_id="1056">M+ Liga de Campeones 8</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="LigadeCampeones8porMovistarPlusPlus.es" site_id="11036">M+ Liga de Campeones 9</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="LigadeCampeones9porMovistarPlusPlus.es" site_id="1096">M+ Liga de Campeones 10</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="LigadeCampeones10porMovistarPlusPlus.es" site_id="1097">M+ Liga de Campeones 11</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="LigadeCampeones11porMovistarPlusPlus.es" site_id="1098">M+ Liga de Campeones 12</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="LigadeCampeones12porMovistarPlusPlus.es" site_id="1099">M+ Liga de Campeones 13</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="LigadeCampeones13porMovistarPlusPlus.es" site_id="11065">M+ Liga de Campeones 14</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="LigadeCampeones14porMovistarPlusPlus.es" site_id="11066">M+ Liga de Campeones 15</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="LigadeCampeones15porMovistarPlusPlus.es" site_id="11067">M+ Liga de Campeones 16</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="LigadeCampeones16porMovistarPlusPlus.es" site_id="11068">M+ Liga de Campeones 17</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="LaLigaTVUHDporMovistarPlusPlus.es" site_id="11043">M LALIGA TV UHD</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="LaLigaTVporMovistarPlusPlus.es" site_id="11013">M+ LALIGA TV</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="LaLiga1porMovistarPlusPlus.es" site_id="11026">M+ LALIGA TV 2</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="LaLigaTV2porMovistarPlusPlus.es" site_id="1057">M+ LALIGATV 3</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="LaLigaTV3porMovistarPlusPlus.es" site_id="1058">M+ LALIGATV 4</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="LaLigaTV.es" site_id="11129">LA LIGA TV</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="DAZNLaLiga" site_id="11077">DAZN LALIGA</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="DAZNLaLiga2" site_id="11080">DAZN LALIGA 2</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="LaLigaHypermotion.es" site_id="11083">LALIGATV HYPERMOTION</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="LaLigaHypermotion2.es" site_id="11084">LALIGATV HYPERMOTION 2</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="LaLigaHypermotion3.es" site_id="11085">LALIGATV HYPERMOTION 3</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="GOLPLAY.es" site_id="11031">GOL PLAY</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="Mezzo.fr" site_id="1031">Mezzo HD</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="MTV00s.uk" site_id="1026">MTV 00s</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="HITTV.es" site_id="2046">HIT TV</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="MTV.es" site_id="11050">MTV España</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="MTVLive.us" site_id="11051">MTV Live</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="SolMusica.es" site_id="11119">Sol Música</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="StingrayClassica.ca" site_id="12003">Classica HD</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="StingrayFestival4K.ca" site_id="11060">Festival 4K</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="StingrayDJAZZ.ca" site_id="12004">Djazz</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="StingrayiConcerts.ca" site_id="12002">iConcerts</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="MezzoLive.fr" site_id="12005">MezzoLiveHD</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="TraceLatina.fr" site_id="11106">TRACE Latina</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="TraceUrban.fr" site_id="11107">TRACE Urban</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="CaracolTV.co" site_id="1029">Caracol TV</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="EWTNEspanaLatinAmerica.us" site_id="1068">EWTN</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="Gulli.fr" site_id="1077">Gulli</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="France2.fr" site_id="1082">France 2</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="France5" site_id="1083">France 5</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="TraceSportStars.fr" site_id="1095">Trace Sport Stars</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="TV5MondeEurope.fr" site_id="11023">TV5MONDE</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="QwestTV.fr" site_id="1088">Qwest TV</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="Eurosport1.fr" site_id="11035">Eurosport 1</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="Eurosport2.fr" site_id="11059">Eurosport 2</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="MyZenTV.fr" site_id="11070">Myzen TV</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="FightSports.us" site_id="12007">FightSports</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="FightBoxHD.nl" site_id="1091">Fight Box HD</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="Gametoon.es" site_id="1086">Gametoon</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="EuronewsSpanish.fr" site_id="1090">Euronews</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="ElToroTV.es" site_id="11049">El Toro TV</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="Motorvision.de" site_id="11105">Motorvision</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="Esport3.es" site_id="2038">Esport3</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="BBCNewsEurope.uk" site_id="11021">BBC World HD</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="CNNInternationalEurope.us" site_id="11022">CNN</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="DWEspanol.de" site_id="11024">Deutsche Welle</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="AlJazeeraEnglish.qa" site_id="11025">Al Jazeera</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="PROTV.ba" site_id="11028">Pro TV</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="Ubeat.es" site_id="11061">Ubeat</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="OUTtv.ca" site_id="11072">OUTtv</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="BUENVIAJE.es" site_id="11112">¡BUENVIAJE!</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="TennisChannel.us" site_id="11120">Tennis Channel</channel>
|
||||
<channel site="orangetv.es" lang="es" xmltv_id="NauticalChannel.it" site_id="11128">Nautical Channel</channel>
|
||||
</channels>
|
107
fixes/orangetv.es/orangetv.es.config.js
Normal file
107
fixes/orangetv.es/orangetv.es.config.js
Normal file
@ -0,0 +1,107 @@
|
||||
// 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 axios = require('axios')
|
||||
|
||||
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`
|
||||
},
|
||||
async parser({ content, channel, date }) {
|
||||
let items = []
|
||||
|
||||
const promises = [
|
||||
axios.get(
|
||||
`${API_PROGRAM_ENDPOINT}/${date.format('YYYYMMDD')}_8h_1.json`,
|
||||
),
|
||||
axios.get(
|
||||
`${API_PROGRAM_ENDPOINT}/${date.format('YYYYMMDD')}_8h_2.json`,
|
||||
),
|
||||
axios.get(
|
||||
`${API_PROGRAM_ENDPOINT}/${date.format('YYYYMMDD')}_8h_3.json`,
|
||||
),
|
||||
]
|
||||
|
||||
await Promise.all(promises)
|
||||
.then(results => {
|
||||
results.forEach(r => {
|
||||
const responseContent = r.data
|
||||
items = items.concat(parseItems(responseContent, channel))
|
||||
})
|
||||
})
|
||||
.catch(console.error)
|
||||
|
||||
// remove duplicates
|
||||
items = items.filter((item, index) => items.findIndex(oi => oi.id === item.id) === index);
|
||||
|
||||
let programs = []
|
||||
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) : typeof content === 'object' ? content : []
|
||||
|
||||
const channelData = json.find(i => i.channelExternalId == channel.site_id);
|
||||
|
||||
if(!channelData)
|
||||
return [];
|
||||
|
||||
|
||||
return channelData.programs;
|
||||
}
|
197
fixes/pickx.be/pickx.be.config.js
Normal file
197
fixes/pickx.be/pickx.be.config.js
Normal file
@ -0,0 +1,197 @@
|
||||
// credit for this fix goes to davidclaeysquinones for his PR on https://github.com/iptv-org/epg/pull/2430 and to BellezaEmporium for his PR on https://github.com/iptv-org/epg/pull/2480
|
||||
|
||||
const axios = require('axios')
|
||||
const dayjs = require('dayjs')
|
||||
const utc = require('dayjs/plugin/utc')
|
||||
|
||||
let apiVersion
|
||||
let isApiVersionFetched = false
|
||||
|
||||
;(async () => {
|
||||
try {
|
||||
await fetchApiVersion()
|
||||
isApiVersionFetched = true
|
||||
} catch (error) {
|
||||
console.error('Error during script initialization:', error)
|
||||
}
|
||||
})()
|
||||
|
||||
dayjs.extend(utc)
|
||||
|
||||
module.exports = {
|
||||
site: 'pickx.be',
|
||||
days: 2,
|
||||
apiVersion: function () {
|
||||
return apiVersion
|
||||
},
|
||||
fetchApiVersion: fetchApiVersion, // Export fetchApiVersion
|
||||
url: async function ({ channel, date }) {
|
||||
while (!isApiVersionFetched) {
|
||||
await new Promise(resolve => setTimeout(resolve, 100)) // Wait for 100 milliseconds
|
||||
}
|
||||
return `https://px-epg.azureedge.net/airings/${apiVersion}/${date.format(
|
||||
'YYYY-MM-DD'
|
||||
)}/channel/${channel.site_id}?timezone=Europe%2FBrussels`
|
||||
},
|
||||
request: {
|
||||
headers: {
|
||||
Origin: 'https://www.pickx.be',
|
||||
Referer: 'https://www.pickx.be/'
|
||||
}
|
||||
},
|
||||
parser({ channel, content }) {
|
||||
const programs = []
|
||||
if (content) {
|
||||
const items = JSON.parse(content)
|
||||
items.forEach(item => {
|
||||
programs.push({
|
||||
title: item.program.title,
|
||||
sub_title: item.program.episodeTitle,
|
||||
description: item.program.description,
|
||||
category: item.program.translatedCategory?.[channel.lang]
|
||||
? item.program.translatedCategory[channel.lang]
|
||||
: item.program.category.split('.')[1],
|
||||
image: item.program.posterFileName
|
||||
? `https://experience-cache.proximustv.be/posterserver/poster/EPG/w-166_h-110/${item.program.posterFileName}`
|
||||
: null,
|
||||
season: item.program.seasonNumber,
|
||||
episode: item.program.episodeNumber,
|
||||
actors: item.program.actors,
|
||||
director: item.program.director ? [item.program.director] : null,
|
||||
start: dayjs.utc(item.programScheduleStart),
|
||||
stop: dayjs.utc(item.programScheduleEnd)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
return programs
|
||||
},
|
||||
async channels({ lang = '' }) {
|
||||
const query = {
|
||||
operationName: 'getChannels',
|
||||
variables: {
|
||||
language: lang,
|
||||
queryParams: {},
|
||||
id: '0',
|
||||
params: {
|
||||
shouldReadFromCache: true
|
||||
}
|
||||
},
|
||||
query: `query getChannels($language: String!, $queryParams: ChannelQueryParams, $id: String, $params: ChannelParams) {
|
||||
channels(language: $language, queryParams: $queryParams, id: $id, params: $params) {
|
||||
id
|
||||
channelReferenceNumber
|
||||
name
|
||||
callLetter
|
||||
number
|
||||
logo {
|
||||
key
|
||||
url
|
||||
__typename
|
||||
}
|
||||
language
|
||||
hd
|
||||
radio
|
||||
replayable
|
||||
ottReplayable
|
||||
playable
|
||||
ottPlayable
|
||||
recordable
|
||||
subscribed
|
||||
cloudRecordable
|
||||
catchUpWindowInHours
|
||||
isOttNPVREnabled
|
||||
ottNPVRStart
|
||||
subscription {
|
||||
channelRef
|
||||
subscribed
|
||||
upselling {
|
||||
upsellable
|
||||
packages
|
||||
__typename
|
||||
}
|
||||
__typename
|
||||
}
|
||||
packages
|
||||
__typename
|
||||
}
|
||||
}`
|
||||
}
|
||||
const result = await axios
|
||||
.post('https://api.proximusmwc.be/tiams/v2/graphql', query)
|
||||
.then(r => r.data)
|
||||
.catch(console.error)
|
||||
|
||||
return (
|
||||
result?.data?.channels
|
||||
.filter(
|
||||
channel =>
|
||||
!channel.radio && (!lang || channel.language === (lang === 'de' ? 'ger' : lang))
|
||||
)
|
||||
.map(channel => {
|
||||
return {
|
||||
lang: channel.language === 'ger' ? 'de' : channel.language,
|
||||
site_id: channel.id,
|
||||
name: channel.name
|
||||
}
|
||||
}) || []
|
||||
)
|
||||
}
|
||||
}
|
||||
function fetchApiVersion() {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
try {
|
||||
// load pickx bundle and get react version hash (regex).
|
||||
// it's not the best way to get the version but it's the only way to get it.
|
||||
|
||||
// find bundle version
|
||||
const minBundleVer = "https://www.pickx.be/minimal-bundle-version"
|
||||
const bundleVerData = await axios.get(minBundleVer, {
|
||||
headers: {
|
||||
Origin: 'https://www.pickx.be',
|
||||
Referer: 'https://www.pickx.be/'
|
||||
}
|
||||
})
|
||||
|
||||
if (bundleVerData.status !== 200) {
|
||||
console.error(`Failed to fetch bundle version. Status: ${bundleVerData.status}`)
|
||||
reject(`Failed to fetch bundle version. Status: ${bundleVerData.status}`)
|
||||
} else {
|
||||
const bundleVer = bundleVerData.data.version
|
||||
// get the minified JS app bundle
|
||||
const bundleUrl = `https://components.pickx.be/pxReactPlayer/${bundleVer}/bundle.min.js`
|
||||
|
||||
// now, find the react hash inside the bundle URL
|
||||
const bundle = await axios.get(bundleUrl).then(r => {
|
||||
const re = /REACT_APP_VERSION_HASH:"([^"]+)"/
|
||||
const match = r.data.match(re)
|
||||
if (match && match[1]) {
|
||||
return match[1]
|
||||
} else {
|
||||
throw new Error('React app version hash not found')
|
||||
}
|
||||
}).catch(console.error)
|
||||
|
||||
const versionUrl = `https://www.pickx.be/api/s-${bundle.replace('/REACT_APP_VERSION_HASH:"', '')}`
|
||||
|
||||
const response = await axios.get(versionUrl, {
|
||||
headers: {
|
||||
Origin: 'https://www.pickx.be',
|
||||
Referer: 'https://www.pickx.be/'
|
||||
}
|
||||
})
|
||||
|
||||
if (response.status === 200) {
|
||||
apiVersion = response.data.version
|
||||
resolve()
|
||||
} else {
|
||||
console.error(`Failed to fetch API version. Status: ${response.status}`)
|
||||
reject(`Failed to fetch API version. Status: ${response.status}`)
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error during fetchApiVersion:', error)
|
||||
reject(error)
|
||||
}
|
||||
})
|
||||
}
|
140
fixes/telenet.tv/telenet.tv.config.js
Normal file
140
fixes/telenet.tv/telenet.tv.config.js
Normal file
@ -0,0 +1,140 @@
|
||||
// credit for this fix goes to davidclaeysquinones for his PR on https://github.com/iptv-org/epg/pull/2429
|
||||
|
||||
const axios = require('axios')
|
||||
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',
|
||||
days: 2,
|
||||
request: {
|
||||
cache: {
|
||||
ttl: 60 * 60 * 1000 // 1 hour
|
||||
}
|
||||
},
|
||||
url: function ({ date, channel }) {
|
||||
return `${API_STATIC_ENDPOINT}/${channel.lang}/events/segments/${date.format('YYYYMMDDHHmmss')}`
|
||||
},
|
||||
async parser({ content, channel, date }) {
|
||||
let programs = []
|
||||
let items = parseItems(content, channel)
|
||||
if (!items.length) return programs
|
||||
const promises = [
|
||||
axios.get(
|
||||
`${API_STATIC_ENDPOINT}/${channel.lang}/events/segments/${date
|
||||
.add(6, 'h')
|
||||
.format('YYYYMMDDHHmmss')}`,
|
||||
{
|
||||
responseType: 'arraybuffer'
|
||||
}
|
||||
),
|
||||
axios.get(
|
||||
`${API_STATIC_ENDPOINT}/${channel.lang}/events/segments/${date
|
||||
.add(12, 'h')
|
||||
.format('YYYYMMDDHHmmss')}`,
|
||||
{
|
||||
responseType: 'arraybuffer'
|
||||
}
|
||||
),
|
||||
axios.get(
|
||||
`${API_STATIC_ENDPOINT}/${channel.lang}/events/segments/${date
|
||||
.add(18, 'h')
|
||||
.format('YYYYMMDDHHmmss')}`,
|
||||
{
|
||||
responseType: 'arraybuffer'
|
||||
}
|
||||
)
|
||||
]
|
||||
|
||||
await Promise.allSettled(promises)
|
||||
.then(results => {
|
||||
results.forEach(r => {
|
||||
if (r.status === 'fulfilled') {
|
||||
const parsed = parseItems(r.value.data, channel)
|
||||
|
||||
items = items.concat(parsed)
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(console.error)
|
||||
|
||||
for (let item of items) {
|
||||
const detail = await loadProgramDetails(item, channel)
|
||||
programs.push({
|
||||
title: item.title,
|
||||
icon: parseIcon(item),
|
||||
description: detail.longDescription,
|
||||
category: detail.genres,
|
||||
actors: detail.actors,
|
||||
season: parseSeason(detail),
|
||||
episode: parseEpisode(detail),
|
||||
start: parseStart(item),
|
||||
stop: parseStop(item)
|
||||
})
|
||||
}
|
||||
|
||||
return programs
|
||||
},
|
||||
async channels() {
|
||||
const data = await axios
|
||||
.get(`${API_PROD_ENDPOINT}/channels?cityId=28001&language=en&productClass=Orion-DASH`)
|
||||
.then(r => r.data)
|
||||
.catch(console.log)
|
||||
|
||||
return data.map(item => {
|
||||
return {
|
||||
lang: 'nl',
|
||||
site_id: item.id,
|
||||
name: item.name
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
async function loadProgramDetails(item, channel) {
|
||||
if (!item.id) return {}
|
||||
const url = `${API_PROD_ENDPOINT}/replayEvent/${item.id}?returnLinearContent=true&language=${channel.lang}`
|
||||
const data = await axios
|
||||
.get(url)
|
||||
.then(r => r.data)
|
||||
.catch(console.log)
|
||||
|
||||
return data || {}
|
||||
}
|
||||
|
||||
function parseStart(item) {
|
||||
return dayjs.unix(item.startTime)
|
||||
}
|
||||
|
||||
function parseStop(item) {
|
||||
return dayjs.unix(item.endTime)
|
||||
}
|
||||
|
||||
function parseItems(content, channel) {
|
||||
if (!content) return []
|
||||
const data = JSON.parse(content)
|
||||
if (!data || !Array.isArray(data.entries)) return []
|
||||
const channelData = data.entries.find(e => e.channelId === channel.site_id)
|
||||
if (!channelData) return []
|
||||
|
||||
return Array.isArray(channelData.events) ? channelData.events : []
|
||||
}
|
||||
|
||||
function parseSeason(detail) {
|
||||
if (!detail.seasonNumber) return null
|
||||
if (String(detail.seasonNumber).length > 2) return null
|
||||
return detail.seasonNumber
|
||||
}
|
||||
|
||||
function parseEpisode(detail) {
|
||||
if (!detail.episodeNumber) return null
|
||||
if (String(detail.episodeNumber).length > 3) return null
|
||||
return detail.episodeNumber
|
||||
}
|
||||
|
||||
function parseIcon(item) {
|
||||
return `${API_IMAGE_ENDPOINT}/intent/${item.id}/posterTile`;
|
||||
}
|
232
fixes/web.magentatv.de/web.magentatv.de.config.js
Normal file
232
fixes/web.magentatv.de/web.magentatv.de.config.js
Normal file
@ -0,0 +1,232 @@
|
||||
// credit for this fix goes to klausellus-wallace for his PR on https://github.com/iptv-org/epg/pull/2458
|
||||
|
||||
const axios = require('axios')
|
||||
const dayjs = require('dayjs')
|
||||
const utc = require('dayjs/plugin/utc')
|
||||
const customParseFormat = require('dayjs/plugin/customParseFormat')
|
||||
const fetch = require('node-fetch')
|
||||
const { upperCase } = require('lodash')
|
||||
|
||||
let X_CSRFTOKEN
|
||||
let COOKIE
|
||||
const cookiesToExtract = ['JSESSIONID', 'CSESSIONID', 'CSRFSESSION']
|
||||
const extractedCookies = {}
|
||||
|
||||
dayjs.extend(utc)
|
||||
dayjs.extend(customParseFormat)
|
||||
|
||||
module.exports = {
|
||||
site: 'web.magentatv.de',
|
||||
days: 2,
|
||||
url: 'https://api.prod.sngtv.magentatv.de/EPG/JSON/PlayBillList',
|
||||
request: {
|
||||
method: 'POST',
|
||||
headers: function () {
|
||||
return setHeaders()
|
||||
},
|
||||
|
||||
data({ channel, date }) {
|
||||
return {
|
||||
count: -1,
|
||||
isFillProgram: 1,
|
||||
offset: 0,
|
||||
properties: [
|
||||
{
|
||||
include: 'endtime,genres,id,name,starttime,channelid,pictures,introduce,subName,seasonNum,subNum,cast,country,producedate,externalIds',
|
||||
name: 'playbill'
|
||||
}
|
||||
],
|
||||
type: 2,
|
||||
begintime: date.format('YYYYMMDD000000'),
|
||||
channelid: channel.site_id,
|
||||
endtime: date.add(1, 'd').format('YYYYMMDD000000')
|
||||
}
|
||||
}
|
||||
},
|
||||
parser: function ({ content }) {
|
||||
let programs = []
|
||||
const items = parseItems(content)
|
||||
items.forEach(item => {
|
||||
programs.push({
|
||||
title: item.name,
|
||||
description: item.introduce,
|
||||
image: parseImage(item),
|
||||
category: parseCategory(item),
|
||||
start: parseStart(item),
|
||||
stop: parseStop(item),
|
||||
sub_title: item.subName,
|
||||
season: item.seasonNum,
|
||||
episode: item.subNum,
|
||||
directors: parseDirectors(item),
|
||||
producers: parseProducers(item),
|
||||
adapters: parseAdapters(item),
|
||||
country: upperCase(item.country),
|
||||
date: item.producedate,
|
||||
urls: parseUrls(item)
|
||||
})
|
||||
})
|
||||
return programs
|
||||
},
|
||||
async channels() {
|
||||
const url = 'https://api.prod.sngtv.magentatv.de/EPG/JSON/AllChannel'
|
||||
const body = {
|
||||
channelNamespace: 2,
|
||||
filterlist: [
|
||||
{
|
||||
key: 'IsHide',
|
||||
value: '-1'
|
||||
}
|
||||
],
|
||||
metaDataVer: 'Channel/1.1',
|
||||
properties: [
|
||||
{
|
||||
include: '/channellist/logicalChannel/contentId,/channellist/logicalChannel/name',
|
||||
name: 'logicalChannel'
|
||||
}
|
||||
],
|
||||
returnSatChannel: 0
|
||||
}
|
||||
const params = {
|
||||
headers: await setHeaders()
|
||||
}
|
||||
|
||||
const data = await axios
|
||||
.post(url, body, params)
|
||||
.then(r => r.data)
|
||||
.catch(console.log)
|
||||
|
||||
return data.channellist.map(item => {
|
||||
return {
|
||||
lang: 'de',
|
||||
site_id: item.contentId,
|
||||
name: item.name
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function parseCategory(item) {
|
||||
return item.genres
|
||||
? item.genres
|
||||
.replace('und', ',')
|
||||
.split(',')
|
||||
.map(i => i.trim())
|
||||
: []
|
||||
}
|
||||
|
||||
function parseDirectors(item) {
|
||||
if (!item.cast || !item.cast.director) return [];
|
||||
return item.cast.director
|
||||
.replace('und', ',')
|
||||
.split(',')
|
||||
.map(i => i.trim());
|
||||
}
|
||||
|
||||
function parseProducers(item) {
|
||||
if (!item.cast || !item.cast.producer) return [];
|
||||
return item.cast.producer
|
||||
.replace('und', ',')
|
||||
.split(',')
|
||||
.map(i => i.trim())
|
||||
}
|
||||
|
||||
function parseAdapters(item) {
|
||||
if (!item.cast || !item.cast.adaptor) return [];
|
||||
return item.cast.adaptor
|
||||
.replace('und', ',')
|
||||
.split(',')
|
||||
.map(i => i.trim())
|
||||
}
|
||||
|
||||
function parseUrls(item) {
|
||||
// currently only a imdb id is returned by the api, thus we can construct the url here
|
||||
if (!item.externalIds) return [];
|
||||
return JSON.parse(item.externalIds)
|
||||
.filter(externalId => externalId.type === 'imdb' && externalId.id)
|
||||
.map(externalId => ({ system: 'imdb', value: `https://www.imdb.com/title/${externalId.id}` }))
|
||||
}
|
||||
|
||||
function parseImage(item) {
|
||||
if (!Array.isArray(item.pictures) || !item.pictures.length) return null
|
||||
|
||||
return item.pictures[0].href
|
||||
}
|
||||
|
||||
function parseStart(item) {
|
||||
return dayjs.utc(item.starttime, 'YYYY-MM-DD HH:mm:ss')
|
||||
}
|
||||
|
||||
function parseStop(item) {
|
||||
return dayjs.utc(item.endtime, 'YYYY-MM-DD HH:mm:ss')
|
||||
}
|
||||
|
||||
function parseItems(content) {
|
||||
const data = JSON.parse(content)
|
||||
if (!data || !Array.isArray(data.playbilllist)) return []
|
||||
|
||||
return data.playbilllist
|
||||
}
|
||||
|
||||
// Function to try to fetch COOKIE and X_CSRFTOKEN
|
||||
function fetchCookieAndToken() {
|
||||
return fetch(
|
||||
'https://api.prod.sngtv.magentatv.de/EPG/JSON/Authenticate?SID=firstup&T=Windows_chrome_118',
|
||||
{
|
||||
headers: {
|
||||
accept: 'application/json, text/javascript, */*; q=0.01',
|
||||
'content-type': 'application/x-www-form-urlencoded; charset=UTF-8',
|
||||
'sec-fetch-dest': 'empty',
|
||||
'sec-fetch-mode': 'cors',
|
||||
'sec-fetch-site': 'same-origin',
|
||||
'x-requested-with': 'XMLHttpRequest',
|
||||
Referer: 'https://web.magentatv.de/',
|
||||
'Referrer-Policy': 'strict-origin-when-cross-origin'
|
||||
},
|
||||
body: '{"terminalid":"00:00:00:00:00:00","mac":"00:00:00:00:00:00","terminaltype":"WEBTV","utcEnable":1,"timezone":"Etc/GMT0","userType":3,"terminalvendor":"Unknown"}',
|
||||
method: 'POST'
|
||||
}
|
||||
)
|
||||
.then(response => {
|
||||
// Check if the response status is OK (2xx)
|
||||
if (!response.ok) {
|
||||
throw new Error('HTTP request failed')
|
||||
}
|
||||
|
||||
// Extract the set-cookie header
|
||||
const setCookieHeader = response.headers.raw()['set-cookie']
|
||||
|
||||
// Extract the cookies specified in cookiesToExtract
|
||||
cookiesToExtract.forEach(cookieName => {
|
||||
const regex = new RegExp(`${cookieName}=(.+?)(;|$)`)
|
||||
const match = setCookieHeader.find(header => regex.test(header))
|
||||
|
||||
if (match) {
|
||||
const cookieValue = regex.exec(match)[1]
|
||||
extractedCookies[cookieName] = cookieValue
|
||||
}
|
||||
})
|
||||
|
||||
return response.json()
|
||||
})
|
||||
.then(data => {
|
||||
if (data.csrfToken) {
|
||||
X_CSRFTOKEN = data.csrfToken
|
||||
COOKIE = `JSESSIONID=${extractedCookies.JSESSIONID}; CSESSIONID=${extractedCookies.CSESSIONID}; CSRFSESSION=${extractedCookies.CSRFSESSION}; JSESSIONID=${extractedCookies.JSESSIONID};`
|
||||
} else {
|
||||
console.log('csrfToken not found in the response.')
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error)
|
||||
})
|
||||
}
|
||||
|
||||
function setHeaders() {
|
||||
return fetchCookieAndToken().then(() => {
|
||||
return {
|
||||
X_CSRFTOKEN: X_CSRFTOKEN,
|
||||
'Content-Type': 'application/json',
|
||||
Cookie: COOKIE
|
||||
}
|
||||
})
|
||||
}
|
10
start.sh
10
start.sh
@ -7,6 +7,8 @@ for arg in "$@"; do
|
||||
work-dir=*) work_dir="${arg#*=}" ;;
|
||||
days=*) days="${arg#*=}" ;;
|
||||
max_connections=*) max_connections="${arg#*=}" ;;
|
||||
enable_fixes=*) enable_fixes="${arg#*=}" ;;
|
||||
api_url=*) api_url="${arg#*=}" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
@ -15,6 +17,14 @@ cd $work_dir
|
||||
echo "working dir : " $(pwd)
|
||||
echo "days : ${days}"
|
||||
echo "max_connections : ${max_connections}"
|
||||
echo "enable_fixes : ${enable_fixes}"
|
||||
echo "api url : ${api_url}"
|
||||
|
||||
if [ "$enable_fixes" = true ] ; then
|
||||
cp -R /fixes/* /bin/epg/sites/
|
||||
fi
|
||||
|
||||
sed -i -E "s/(https:\x2f\x2fiptv-org.github.io\x2fapi)/$api_url/g" $work_dir/scripts/core/apiClient.ts
|
||||
|
||||
pm2 --name epg start npm -- run serve
|
||||
npm run grab -- --channels=channels.xml --maxConnections=$max_connections --days=$days --gzip
|
||||
|
Reference in New Issue
Block a user