mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
Update tvtv.us.config.js
This commit is contained in:
parent
f6f20c28e4
commit
9c95901acf
1 changed files with 2 additions and 12 deletions
|
@ -11,9 +11,6 @@ module.exports = {
|
||||||
channel.site_id
|
channel.site_id
|
||||||
}/airings?startDateTime=${date.format()}&endDateTime=${date.add(1, 'd').format()}`
|
}/airings?startDateTime=${date.format()}&endDateTime=${date.add(1, 'd').format()}`
|
||||||
},
|
},
|
||||||
logo({ channel }) {
|
|
||||||
return channel.logo
|
|
||||||
},
|
|
||||||
parser: function ({ content }) {
|
parser: function ({ content }) {
|
||||||
let programs = []
|
let programs = []
|
||||||
|
|
||||||
|
@ -50,22 +47,19 @@ module.exports = {
|
||||||
if (!stationData) continue
|
if (!stationData) continue
|
||||||
|
|
||||||
let channel
|
let channel
|
||||||
const logo = parseChannelLogo(stationData.preferredImage)
|
|
||||||
switch (stationData.type) {
|
switch (stationData.type) {
|
||||||
case 'Low Power Broadcast':
|
case 'Low Power Broadcast':
|
||||||
case 'Full Power Broadcast':
|
case 'Full Power Broadcast':
|
||||||
channel = {
|
channel = {
|
||||||
site_id: station.id,
|
site_id: station.id,
|
||||||
name: stationData.name,
|
name: stationData.name,
|
||||||
xmltv_id: parseChannelId(stationData),
|
xmltv_id: parseChannelId(stationData)
|
||||||
logo
|
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
channel = {
|
channel = {
|
||||||
site_id: station.id,
|
site_id: station.id,
|
||||||
name: stationData.name,
|
name: stationData.name
|
||||||
logo
|
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -79,10 +73,6 @@ module.exports = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseChannelLogo(image) {
|
|
||||||
return image && image.uri ? `http://tvtv.tmsimg.com/${image.uri}` : null
|
|
||||||
}
|
|
||||||
|
|
||||||
function parseChannelId(data) {
|
function parseChannelId(data) {
|
||||||
if (!data.callSign) return null
|
if (!data.callSign) return null
|
||||||
if (/^((CB|C[F-K]|V[A-G]|VO|VX|VY|X[J-O])[0-9A-Z-]+)/.test(data.callSign))
|
if (/^((CB|C[F-K]|V[A-G]|VO|VX|VY|X[J-O])[0-9A-Z-]+)/.test(data.callSign))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue