mirror of
https://github.com/iptv-org/epg
synced 2026-09-19 07:26:25 -04:00
Update orangetv.es.config.js
This commit is contained in:
@@ -93,13 +93,16 @@ function parseIcon(item){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function parseItems(content, channel) {
|
function parseItems(content, channel) {
|
||||||
const json = typeof content === 'string' ? JSON.parse(content) : typeof content === 'object' ? content : []
|
const json = typeof content === 'string' ? JSON.parse(content) : Array.isArray(content) ? content : []
|
||||||
|
|
||||||
|
if (!Array.isArray(json)) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
const channelData = json.find(i => i.channelExternalId == channel.site_id);
|
const channelData = json.find(i => i.channelExternalId == channel.site_id);
|
||||||
|
|
||||||
if(!channelData)
|
if(!channelData)
|
||||||
return [];
|
return [];
|
||||||
|
|
||||||
|
|
||||||
return channelData.programs;
|
return channelData.programs;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user