Update movistarplus.es.config.js

This commit is contained in:
freearhey
2026-04-19 02:28:58 +03:00
parent 5a5798ca0f
commit f403e5c1d1

View File

@@ -31,6 +31,8 @@ module.exports = {
programs.push({ programs.push({
title: el.title, title: el.title,
description: el.description, description: el.description,
icon: el.icon,
images: el.images,
season: el.season, season: el.season,
episode: el.episode, episode: el.episode,
start: el.start, start: el.start,
@@ -38,11 +40,12 @@ module.exports = {
}) })
}) })
return programs return programs
}, },
async channels() { async channels() {
const json = await axios 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) .then(r => r.data)
.catch(console.log) .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) { async function parseItems(content) {
try { try {
const data = JSON.parse(content) const data = JSON.parse(content)
const programs = Array.isArray(data) ? data : [data] 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 start = dayjs.utc(Number(json?.FechaHoraInicio))
const stop = dayjs.utc(Number(json?.FechaHoraFin)) const stop = dayjs.utc(Number(json?.FechaHoraFin))
const ficha = json?.Ficha || null const ficha = json?.Ficha || null
@@ -70,6 +78,8 @@ async function parseItems(content) {
return { return {
title: json?.Titulo || '', title: json?.Titulo || '',
description: json?.Resena || '', description: json?.Resena || '',
icon: json?.Imagen || '',
images: json.Imagenes ? parseImages(json.Imagenes) : [],
start, start,
stop stop
} }
@@ -79,6 +89,8 @@ async function parseItems(content) {
return { return {
title: json?.Titulo || fichaJson?.Titulo || '', title: json?.Titulo || fichaJson?.Titulo || '',
description: fichaJson?.Descripcion || json?.Resena || '', description: fichaJson?.Descripcion || json?.Resena || '',
icon: fichaJson?.Imagen || '',
images: fichaJson.Imagenes ? parseImages(fichaJson.Imagenes) : [],
actors: fichaJson?.Actores || [], actors: fichaJson?.Actores || [],
directors: fichaJson?.Directores || [], directors: fichaJson?.Directores || [],
classification: fichaJson?.Clasificacion || '', classification: fichaJson?.Clasificacion || '',
@@ -91,12 +103,15 @@ async function parseItems(content) {
return { return {
title: json?.Titulo || '', title: json?.Titulo || '',
description: json?.Resena || '', description: json?.Resena || '',
icon: json?.Imagen || '',
images: json.Imagenes ? parseImages(json.Imagenes) : [],
start, start,
stop stop
} }
} }
} }
})) })
)
} catch { } catch {
return [] return []
} }