Update tvguide.com.config.js

This commit is contained in:
Aleksandr Statciuk 2021-09-06 19:00:14 +03:00
parent f32468d19e
commit afc3b05915

View file

@ -11,10 +11,9 @@ module.exports = {
channels: 'tvguide.com.channels.xml',
output: '.gh-pages/guides/tvguide.com.guide.xml',
url: function ({ date, channel }) {
const localTime = date.tz('America/New_York')
const parts = channel.site_id.split('#')
const start = localTime.startOf('d')
const duration = localTime.endOf('d').diff(start, 'm')
const start = date.startOf('d')
const duration = date.endOf('d').diff(start, 'm')
const url = `https://cmg-prod.apigee.net/v1/xapi/tvschedules/tvguide/${
parts[0]
}/web?start=${start.unix()}&duration=${duration}&channelSourceIds=${parts[1]}`