mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 09:00:07 -04:00
commit
6de98c46fd
2 changed files with 12 additions and 3 deletions
|
@ -54,13 +54,15 @@ module.exports = {
|
||||||
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: parseChannelIcon(item)
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
channel = {
|
channel = {
|
||||||
site_id: station.id,
|
site_id: station.id,
|
||||||
name: stationData.name
|
name: stationData.name,
|
||||||
|
logo: parseChannelIcon(item)
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -125,3 +127,9 @@ function parseIcon(item) {
|
||||||
? `https://tvtv.us/gn/i/${item.program.preferredImage.uri}`
|
? `https://tvtv.us/gn/i/${item.program.preferredImage.uri}`
|
||||||
: null
|
: null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function parseChannelIcon(item) {
|
||||||
|
return item.station.preferredImage && item.station.preferredImage.uri
|
||||||
|
? `https://tvtv.us/gn/i/${item.station.preferredImage.uri}`
|
||||||
|
: null
|
||||||
|
}
|
||||||
|
|
|
@ -11,7 +11,8 @@ dayjs.extend(utc)
|
||||||
const date = dayjs.utc('2022-01-17', 'YYYY-MM-DD').startOf('d')
|
const date = dayjs.utc('2022-01-17', 'YYYY-MM-DD').startOf('d')
|
||||||
const channel = {
|
const channel = {
|
||||||
site_id: '62670',
|
site_id: '62670',
|
||||||
xmltv_id: 'AMITV.ca'
|
xmltv_id: 'AMITV.ca',
|
||||||
|
logo: 'https://tvtv.us/gn/i/assets/s62670_ll_h15_ab.png?w=360&h=270'
|
||||||
}
|
}
|
||||||
|
|
||||||
it('can generate valid url', () => {
|
it('can generate valid url', () => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue