mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 17:10:07 -04:00
Merge pull request #81 from iptv-org/fix-tvguide-com
Update tvguide.com.config.js
This commit is contained in:
commit
e2be67f5a8
1 changed files with 2 additions and 3 deletions
|
@ -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]}`
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue