mirror of
https://github.com/iptv-org/epg
synced 2025-12-19 11:56:58 -05:00
@@ -54,13 +54,15 @@ module.exports = {
|
||||
channel = {
|
||||
site_id: station.id,
|
||||
name: stationData.name,
|
||||
xmltv_id: parseChannelId(stationData)
|
||||
xmltv_id: parseChannelId(stationData),
|
||||
logo: parseChannelIcon(item)
|
||||
}
|
||||
break
|
||||
default:
|
||||
channel = {
|
||||
site_id: station.id,
|
||||
name: stationData.name
|
||||
name: stationData.name,
|
||||
logo: parseChannelIcon(item)
|
||||
}
|
||||
break
|
||||
}
|
||||
@@ -125,3 +127,9 @@ function parseIcon(item) {
|
||||
? `https://tvtv.us/gn/i/${item.program.preferredImage.uri}`
|
||||
: 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 channel = {
|
||||
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', () => {
|
||||
|
||||
Reference in New Issue
Block a user