mirror of
https://github.com/iptv-org/epg
synced 2025-12-18 11:27:06 -05:00
Update i.mjh.nz.config.js
This commit is contained in:
@@ -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({
|
||||||
|
|||||||
Reference in New Issue
Block a user