mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-11 01:20:08 -04:00
Delete tvtv.ca.config.js
This commit is contained in:
parent
6bd5d38e13
commit
de15695f9f
1 changed files with 0 additions and 38 deletions
|
@ -1,38 +0,0 @@
|
|||
const dayjs = require('dayjs')
|
||||
const utc = require('dayjs/plugin/utc')
|
||||
|
||||
dayjs.extend(utc)
|
||||
|
||||
module.exports = {
|
||||
lang: 'en',
|
||||
site: 'tvtv.ca',
|
||||
channels: 'tvtv.ca.channels.xml',
|
||||
output: '.gh-pages/guides/tvtv.ca.guide.xml',
|
||||
url: function ({ date, channel }) {
|
||||
return `https://www.tvtv.ca/tvm/t/tv/v4/stations/${
|
||||
channel.site_id
|
||||
}/listings?start=${date.format()}&end=${date.add(1, 'd').format()}`
|
||||
},
|
||||
parser: function ({ content }) {
|
||||
let programs = []
|
||||
const items = JSON.parse(content)
|
||||
if (!items.length) return programs
|
||||
items.forEach(item => {
|
||||
const start = dayjs.utc(item.listDateTime)
|
||||
const stop = start.add(item.duration, 'm')
|
||||
const icon = item.showPicture
|
||||
? `https://cdn.tvpassport.com/image/show/480x720/${item.showPicture}`
|
||||
: null
|
||||
programs.push({
|
||||
title: item.showName,
|
||||
description: item.description,
|
||||
category: item.showType,
|
||||
start: start.toString(),
|
||||
stop: stop.toString(),
|
||||
icon
|
||||
})
|
||||
})
|
||||
|
||||
return programs
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue