mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 09:00:07 -04:00
Update app.js
This commit is contained in:
parent
d6ac4400a9
commit
f1ab7453fc
1 changed files with 4 additions and 4 deletions
|
@ -132,7 +132,7 @@ const App = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
const guides = await fetch('https://iptv-org.github.io/epg/api/channels.json')
|
const guides = await fetch('api/guides.json')
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.catch(console.log)
|
.catch(console.log)
|
||||||
|
|
||||||
|
@ -140,13 +140,13 @@ const App = {
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(arr =>
|
.then(arr =>
|
||||||
arr.map(c => {
|
arr.map(c => {
|
||||||
const found = guides.find(g => g.id === c.id)
|
const found = guides.filter(g => g.channel === c.id)
|
||||||
c.key = `${c.id}_${c.name}`.replace(/\s/g, '').toLowerCase()
|
c.key = `${c.id}_${c.name}`.replace(/\s/g, '').toLowerCase()
|
||||||
c.guides = found ? found.guides : []
|
c.guides = found.map(f => f.url) || []
|
||||||
return c
|
return c
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
.then(arr => groupBy(arr, 'country'))
|
.then(arr => _.groupBy(arr, 'country'))
|
||||||
.catch(console.log)
|
.catch(console.log)
|
||||||
|
|
||||||
const countries = await fetch('https://iptv-org.github.io/api/countries.json')
|
const countries = await fetch('https://iptv-org.github.io/api/countries.json')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue