Fixes xmltv_id

This commit is contained in:
freearhey committed 2023-12-03 20:50:00 +03:00
1 parent df24c60170
commit 3981133fea
45 files changed
+333 -520

No files matched your search

+8 -3
View File
@@ -45,6 +45,8 @@ module.exports = {
return programs
},
async channels({ country }) {
const _ = require('lodash')
const countries = {
ao: 'ago',
bj: 'ben',
@@ -103,13 +105,16 @@ module.exports = {
.then(r => r.data)
.catch(console.log)
return data.Channels.map(item => {
return {
let channels = []
data.Channels.forEach(item => {
channels.push({
lang: 'en',
site_id: `${code}#${item.Number}`,
name: item.Name
}
})
})
return _.uniqBy(channels, 'site_id')
}
}