Merge pull request #2332 from cruizno/patch-1

Update tvguide.com.config.js
This commit is contained in:
PopeyeTheSai10r 2024-05-03 21:08:05 -07:00 committed by GitHub
commit 7e80e85ac0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,7 +11,7 @@ module.exports = {
days: 2, days: 2,
url: function ({ date, channel }) { url: function ({ date, channel }) {
const [providerId, channelSourceIds] = channel.site_id.split('#') const [providerId, channelSourceIds] = channel.site_id.split('#')
const url = `https://fandom-prod.apigee.net/v1/xapi/tvschedules/tvguide/${providerId}/web?start=${date const url = `https://internal-prod.apigee.fandom.net/v1/xapi/tvschedules/tvguide/${providerId}/web?start=${date
.startOf('d') .startOf('d')
.unix()}&duration=1440&channelSourceIds=${channelSourceIds}` .unix()}&duration=1440&channelSourceIds=${channelSourceIds}`
@ -44,7 +44,7 @@ module.exports = {
for (let providerId of providers) { for (let providerId of providers) {
const data = await axios const data = await axios
.get( .get(
`https://fandom-prod.apigee.net/v1/xapi/tvschedules/tvguide/serviceprovider/${providerId}/sources/web` `https://internal-prod.apigee.fandom.net/v1/xapi/tvschedules/tvguide/serviceprovider/${providerId}/sources/web`
) )
.then(r => r.data) .then(r => r.data)
.catch(console.log) .catch(console.log)
@ -82,6 +82,7 @@ function parseItems(content) {
} }
async function loadProgramDetails(item) { async function loadProgramDetails(item) {
item.programDetails = item.programDetails.replace('player1-backend-prod-internal.apigee.net', 'internal-prod.apigee.fandom.net')
const data = await axios const data = await axios
.get(item.programDetails) .get(item.programDetails)
.then(r => r.data) .then(r => r.data)