mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 17:10:07 -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
|
return programs
|
||||||
},
|
},
|
||||||
async channels({ service, region = 'all', lang = 'en' }) {
|
async channels({ path, lang = 'en' }) {
|
||||||
const data = await axios
|
const [service] = path.split('/')
|
||||||
|
let data = await axios
|
||||||
.get(`https://i.mjh.nz/${service}/app.json`)
|
.get(`https://i.mjh.nz/${service}/app.json`)
|
||||||
.then(r => r.data)
|
.then(r => r.data)
|
||||||
.catch(console.log)
|
.catch(console.log)
|
||||||
|
|
||||||
const channels = []
|
const channels = []
|
||||||
const items = region === 'all' ? data.channels : data.regions[region].channels
|
const items = data.channels || data
|
||||||
const path = `${service}/${region}`
|
|
||||||
for (let id in items) {
|
for (let id in items) {
|
||||||
const channel = items[id]
|
const channel = items[id]
|
||||||
channels.push({
|
channels.push({
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue