mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
Update i.mjh.nz.config.js
This commit is contained in:
parent
1d10a1df2e
commit
d4d48a0bc5
1 changed files with 4 additions and 4 deletions
|
@ -35,15 +35,15 @@ module.exports = {
|
|||
|
||||
return programs
|
||||
},
|
||||
async channels({ service, region = 'all', lang = 'en' }) {
|
||||
const data = await axios
|
||||
async channels({ path, lang = 'en' }) {
|
||||
const [service] = path.split('/')
|
||||
let data = await axios
|
||||
.get(`https://i.mjh.nz/${service}/app.json`)
|
||||
.then(r => r.data)
|
||||
.catch(console.log)
|
||||
|
||||
const channels = []
|
||||
const items = region === 'all' ? data.channels : data.regions[region].channels
|
||||
const path = `${service}/${region}`
|
||||
const items = data.channels || data
|
||||
for (let id in items) {
|
||||
const channel = items[id]
|
||||
channels.push({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue