mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-11 01:20:08 -04:00
Update hd-plus.de.config.js
This commit is contained in:
parent
9e928c1b87
commit
3828dff5de
1 changed files with 4 additions and 7 deletions
|
@ -11,12 +11,13 @@ dayjs.extend(customParseFormat)
|
|||
|
||||
module.exports = {
|
||||
lang: 'de',
|
||||
days: 3,
|
||||
site: 'hd-plus.de',
|
||||
channels: 'hd-plus.de.channels.xml',
|
||||
output: '.gh-pages/guides/hd-plus.de.guide.xml',
|
||||
url({ date, channel }) {
|
||||
const now = dayjs()
|
||||
const day = now.diff(date, 'd')
|
||||
const today = dayjs().utc().startOf('d')
|
||||
const day = date.diff(today, 'd')
|
||||
|
||||
return `https://www.hd-plus.de/epg/channel/${channel.site_id}?d=${day}`
|
||||
},
|
||||
|
@ -32,7 +33,7 @@ module.exports = {
|
|||
items.forEach(item => {
|
||||
const title = parseTitle(item)
|
||||
let start = parseStart(item, date)
|
||||
const stop = parseStop(item, date)
|
||||
const stop = start.add(1, 'h')
|
||||
if (programs.length) {
|
||||
programs[programs.length - 1].stop = start
|
||||
}
|
||||
|
@ -44,10 +45,6 @@ module.exports = {
|
|||
}
|
||||
}
|
||||
|
||||
function parseStop(item, date) {
|
||||
return date.endOf('d')
|
||||
}
|
||||
|
||||
function parseStart(item, date) {
|
||||
let time = (item.querySelector('td:nth-child(2)') || { textContent: '' }).textContent
|
||||
time = time.split(' ').pop()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue