Merge pull request #2994 from michaelarnauts/telenet-tv-episode-name

Fix telenet.tv and add program name details to subTitle
This commit is contained in:
Aleksandr Statciuk
2026-02-04 11:02:33 +03:00
committed by GitHub

View File

@@ -14,7 +14,7 @@ module.exports = {
} }
}, },
url: function ({ date, channel }) { url: function ({ date, channel }) {
return `${API_STATIC_ENDPOINT}/${channel.lang}/events/segments/${date.format('YYYYMMDDHHmmss')}` return `${API_STATIC_ENDPOINT}/${channel.lang}/events/segments/${date.format('YYYYMMDD')}000000`
}, },
async parser({ content, channel, date }) { async parser({ content, channel, date }) {
let programs = [] let programs = []
@@ -22,25 +22,19 @@ module.exports = {
if (!items.length) return programs if (!items.length) return programs
const promises = [ const promises = [
axios.get( axios.get(
`${API_STATIC_ENDPOINT}/${channel.lang}/events/segments/${date `${API_STATIC_ENDPOINT}/${channel.lang}/events/segments/${date.format('YYYYMMDD')}060000`,
.add(6, 'h')
.format('YYYYMMDDHHmmss')}`,
{ {
responseType: 'arraybuffer' responseType: 'arraybuffer'
} }
), ),
axios.get( axios.get(
`${API_STATIC_ENDPOINT}/${channel.lang}/events/segments/${date `${API_STATIC_ENDPOINT}/${channel.lang}/events/segments/${date.format('YYYYMMDD')}120000`,
.add(12, 'h')
.format('YYYYMMDDHHmmss')}`,
{ {
responseType: 'arraybuffer' responseType: 'arraybuffer'
} }
), ),
axios.get( axios.get(
`${API_STATIC_ENDPOINT}/${channel.lang}/events/segments/${date `${API_STATIC_ENDPOINT}/${channel.lang}/events/segments/${date.format('YYYYMMDD')}180000`,
.add(18, 'h')
.format('YYYYMMDDHHmmss')}`,
{ {
responseType: 'arraybuffer' responseType: 'arraybuffer'
} }
@@ -63,6 +57,7 @@ module.exports = {
const detail = await loadProgramDetails(item, channel) const detail = await loadProgramDetails(item, channel)
programs.push({ programs.push({
title: item.title, title: item.title,
subTitle: detail.episodeName,
icon: parseIcon(item), icon: parseIcon(item),
description: detail.longDescription, description: detail.longDescription,
category: detail.genres, category: detail.genres,