Update mi.tv.config.js

This commit is contained in:
Aleksandr Statciuk 2021-09-24 15:34:42 +03:00
parent 522b27052d
commit dc4fe4d333

View file

@ -35,7 +35,7 @@ module.exports = {
if (!start) return
if (start.hour() > 11) PM = true
if (start.hour() < 12 && PM) start = start.add(1, 'd')
const stop = parseStop(item, start)
const stop = start.add(1, 'h')
if (programs.length) {
programs[programs.length - 1].stop = start
}
@ -51,10 +51,6 @@ module.exports = {
}
}
function parseStop(item, date) {
return date.tz('America/Sao_Paulo').add(1, 'h')
}
function parseStart(item, date) {
let time = (item.querySelector('a > div.content > span.time') || { textContent: '' }).textContent
if (!time) return null