Merge pull request #81 from iptv-org/fix-tvguide-com

Update tvguide.com.config.js
This commit is contained in:
Shadix A 2021-09-06 18:06:13 +02:00 committed by GitHub
commit e2be67f5a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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