diff --git a/sites/i.mjh.nz/i.mjh.nz.config.js b/sites/i.mjh.nz/i.mjh.nz.config.js index ce6fcaef..9c7936e0 100644 --- a/sites/i.mjh.nz/i.mjh.nz.config.js +++ b/sites/i.mjh.nz/i.mjh.nz.config.js @@ -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({ diff --git a/sites/i.mjh.nz/i.mjh.nz.test.js b/sites/i.mjh.nz/i.mjh.nz.test.js index eec79db1..dafb5b1c 100644 --- a/sites/i.mjh.nz/i.mjh.nz.test.js +++ b/sites/i.mjh.nz/i.mjh.nz.test.js @@ -1,5 +1,4 @@ -// npm run channels:parse -- --config=./sites/i.mjh.nz/i.mjh.nz.config.js --output=./sites/i.mjh.nz/i.mjh.nz_us-pluto.channels.xml --set=service:PlutoTV --set=region:us -// npm run channels:parse -- --config=./sites/i.mjh.nz/i.mjh.nz.config.js --output=./sites/i.mjh.nz/i.mjh.nz_us-stirr.channels.xml --set=service:Stirr +// npm run channels:parse -- --config=./sites/i.mjh.nz/i.mjh.nz.config.js --output=./sites/i.mjh.nz/i.mjh.nz_us-pluto.channels.xml --set=path:PlutoTV/us // npx epg-grabber --config=sites/i.mjh.nz/i.mjh.nz.config.js --channels=sites/i.mjh.nz/i.mjh.nz_us-pluto.channels.xml --output=guide.xml --days=2 // npx epg-grabber --config=sites/i.mjh.nz/i.mjh.nz.config.js --channels=sites/i.mjh.nz/i.mjh.nz_us-stirr.channels.xml --output=guide.xml --days=2 diff --git a/sites/i.mjh.nz/i.mjh.nz_au-foxtel.channels.xml b/sites/i.mjh.nz/i.mjh.nz_au-foxtel.channels.xml new file mode 100644 index 00000000..f5bac140 --- /dev/null +++ b/sites/i.mjh.nz/i.mjh.nz_au-foxtel.channels.xml @@ -0,0 +1,88 @@ + + + + A&E + Animal Planet + BBC First + BBC World News + beIN SPORTS 1 + beIN SPORTS 2 + beIN SPORTS 3 + Bloomberg Television + Boomerang + BoxSets + Cartoon Network + CBeebies + Club MTV + CMT + CNBC + CNN International + CRIME+INVESTIGATION + Discovery Channel + Discovery Turbo + E! + ESPN2 + ESPN + FOX8 + FOX ARENA + FOX Classics + FOX Comedy + FOX CRICKET + FOX Crime + FOX DOCOS + FOX Footy + FOX Funny + FOX League + FOX One + FOX Sci Fi + FOX SHOWCASE + FOX Sleuth + Fox Sports 503 + Fox Sports 505 + Fox Sports 506 + Fox Sports More+ + FOX SPORTS NEWS + HISTORY + Investigation Discovery + LifeStyle + LifeStyle Food + LifeStyle Home + MTV + MTV Classic + National Geographic + NHK World + Nickelodeon + Nick Music + SKY NEWS + Sky News Extra + Sky Racing 1 + Sky Racing 2 + TLC + TVSN + Universal TV + + + + + + + + + + + + + + + + + + + + + + + + + +