mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-11 17:40:07 -04:00
Update mi.tv.config.js
This commit is contained in:
parent
9e928c1b87
commit
46bfada1e9
1 changed files with 5 additions and 4 deletions
|
@ -9,15 +9,16 @@ dayjs.extend(utc)
|
||||||
dayjs.extend(timezone)
|
dayjs.extend(timezone)
|
||||||
dayjs.extend(customParseFormat)
|
dayjs.extend(customParseFormat)
|
||||||
|
|
||||||
let PM = false
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
lang: 'pt',
|
lang: 'pt',
|
||||||
|
days: 3,
|
||||||
site: 'mi.tv',
|
site: 'mi.tv',
|
||||||
channels: 'mi.tv.channels.xml',
|
channels: 'mi.tv.channels.xml',
|
||||||
output: '.gh-pages/guides/mi.tv.guide.xml',
|
output: '.gh-pages/guides/mi.tv.guide.xml',
|
||||||
url({ date, channel }) {
|
url({ date, channel }) {
|
||||||
const [country, id] = channel.site_id.split('#')
|
const [country, id] = channel.site_id.split('#')
|
||||||
return `https://mi.tv/${country}/async/channel/${id}/${date.format('YYYY-MM-DD')}/180`
|
|
||||||
|
return `https://mi.tv/${country}/async/channel/${id}/${date.format('YYYY-MM-DD')}/-180`
|
||||||
},
|
},
|
||||||
logo({ content }) {
|
logo({ content }) {
|
||||||
const dom = new JSDOM(content)
|
const dom = new JSDOM(content)
|
||||||
|
@ -25,9 +26,9 @@ module.exports = {
|
||||||
return img ? img.src : null
|
return img ? img.src : null
|
||||||
},
|
},
|
||||||
parser({ content, date }) {
|
parser({ content, date }) {
|
||||||
|
let PM = false
|
||||||
const programs = []
|
const programs = []
|
||||||
const items = parseItems(content)
|
const items = parseItems(content)
|
||||||
|
|
||||||
items.forEach(item => {
|
items.forEach(item => {
|
||||||
const title = parseTitle(item)
|
const title = parseTitle(item)
|
||||||
let start = parseStart(item, date)
|
let start = parseStart(item, date)
|
||||||
|
@ -51,7 +52,7 @@ module.exports = {
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseStop(item, date) {
|
function parseStop(item, date) {
|
||||||
return date.endOf('d').add(6, 'h')
|
return date.tz('America/Sao_Paulo').add(1, 'h')
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseStart(item, date) {
|
function parseStart(item, date) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue