mirror of
https://github.com/iptv-org/epg
synced 2026-05-06 17:37:06 -04:00
Update movistarplus.es.config.js
This commit is contained in:
@@ -31,6 +31,8 @@ module.exports = {
|
||||
programs.push({
|
||||
title: el.title,
|
||||
description: el.description,
|
||||
icon: el.icon,
|
||||
images: el.images,
|
||||
season: el.season,
|
||||
episode: el.episode,
|
||||
start: el.start,
|
||||
@@ -38,11 +40,12 @@ module.exports = {
|
||||
})
|
||||
})
|
||||
return programs
|
||||
|
||||
},
|
||||
async channels() {
|
||||
const json = await axios
|
||||
.get('https://ottcache.dof6.com/movistarplus/webplayer/OTT/contents/channels?mdrm=true&tlsstream=true&demarcation=18&version=8')
|
||||
.get(
|
||||
'https://ottcache.dof6.com/movistarplus/webplayer/OTT/contents/channels?mdrm=true&tlsstream=true&demarcation=18&version=8'
|
||||
)
|
||||
.then(r => r.data)
|
||||
.catch(console.log)
|
||||
|
||||
@@ -58,11 +61,16 @@ module.exports = {
|
||||
}
|
||||
}
|
||||
|
||||
function parseImages(images) {
|
||||
return images.filter(image => image.id === 'watch2tgr-end').map(image => image.uri)
|
||||
}
|
||||
|
||||
async function parseItems(content) {
|
||||
try {
|
||||
const data = JSON.parse(content)
|
||||
const programs = Array.isArray(data) ? data : [data]
|
||||
return await Promise.all(programs.map(async (json) => {
|
||||
return await Promise.all(
|
||||
programs.map(async json => {
|
||||
const start = dayjs.utc(Number(json?.FechaHoraInicio))
|
||||
const stop = dayjs.utc(Number(json?.FechaHoraFin))
|
||||
const ficha = json?.Ficha || null
|
||||
@@ -70,6 +78,8 @@ async function parseItems(content) {
|
||||
return {
|
||||
title: json?.Titulo || '',
|
||||
description: json?.Resena || '',
|
||||
icon: json?.Imagen || '',
|
||||
images: json.Imagenes ? parseImages(json.Imagenes) : [],
|
||||
start,
|
||||
stop
|
||||
}
|
||||
@@ -79,6 +89,8 @@ async function parseItems(content) {
|
||||
return {
|
||||
title: json?.Titulo || fichaJson?.Titulo || '',
|
||||
description: fichaJson?.Descripcion || json?.Resena || '',
|
||||
icon: fichaJson?.Imagen || '',
|
||||
images: fichaJson.Imagenes ? parseImages(fichaJson.Imagenes) : [],
|
||||
actors: fichaJson?.Actores || [],
|
||||
directors: fichaJson?.Directores || [],
|
||||
classification: fichaJson?.Clasificacion || '',
|
||||
@@ -91,12 +103,15 @@ async function parseItems(content) {
|
||||
return {
|
||||
title: json?.Titulo || '',
|
||||
description: json?.Resena || '',
|
||||
icon: json?.Imagen || '',
|
||||
images: json.Imagenes ? parseImages(json.Imagenes) : [],
|
||||
start,
|
||||
stop
|
||||
}
|
||||
}
|
||||
}
|
||||
}))
|
||||
})
|
||||
)
|
||||
} catch {
|
||||
return []
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user