Skip to content

Commit 8a68048

Browse files
authored
Merge pull request #2994 from michaelarnauts/telenet-tv-episode-name
Fix telenet.tv and add program name details to subTitle
2 parents 0f4aa59 + 8002fe2 commit 8a68048

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

sites/telenet.tv/telenet.tv.config.js

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,33 +14,27 @@ module.exports = {
1414
}
1515
},
1616
url: function ({ date, channel }) {
17-
return `${API_STATIC_ENDPOINT}/${channel.lang}/events/segments/${date.format('YYYYMMDDHHmmss')}`
17+
return `${API_STATIC_ENDPOINT}/${channel.lang}/events/segments/${date.format('YYYYMMDD')}000000`
1818
},
1919
async parser({ content, channel, date }) {
2020
let programs = []
2121
let items = parseItems(content, channel)
2222
if (!items.length) return programs
2323
const promises = [
2424
axios.get(
25-
`${API_STATIC_ENDPOINT}/${channel.lang}/events/segments/${date
26-
.add(6, 'h')
27-
.format('YYYYMMDDHHmmss')}`,
25+
`${API_STATIC_ENDPOINT}/${channel.lang}/events/segments/${date.format('YYYYMMDD')}060000`,
2826
{
2927
responseType: 'arraybuffer'
3028
}
3129
),
3230
axios.get(
33-
`${API_STATIC_ENDPOINT}/${channel.lang}/events/segments/${date
34-
.add(12, 'h')
35-
.format('YYYYMMDDHHmmss')}`,
31+
`${API_STATIC_ENDPOINT}/${channel.lang}/events/segments/${date.format('YYYYMMDD')}120000`,
3632
{
3733
responseType: 'arraybuffer'
3834
}
3935
),
4036
axios.get(
41-
`${API_STATIC_ENDPOINT}/${channel.lang}/events/segments/${date
42-
.add(18, 'h')
43-
.format('YYYYMMDDHHmmss')}`,
37+
`${API_STATIC_ENDPOINT}/${channel.lang}/events/segments/${date.format('YYYYMMDD')}180000`,
4438
{
4539
responseType: 'arraybuffer'
4640
}
@@ -63,6 +57,7 @@ module.exports = {
6357
const detail = await loadProgramDetails(item, channel)
6458
programs.push({
6559
title: item.title,
60+
subTitle: detail.episodeName,
6661
icon: parseIcon(item),
6762
description: detail.longDescription,
6863
category: detail.genres,

0 commit comments

Comments
 (0)