mirror of
https://github.com/iptv-org/iptv.git
synced 2025-05-12 01:50:04 -04:00
Update countries.js
This commit is contained in:
parent
4ae4213010
commit
43a6fa42e2
1 changed files with 41 additions and 32 deletions
|
@ -7,11 +7,12 @@ module.exports = async function (streams = []) {
|
|||
await api.countries.load()
|
||||
const countries = await api.countries.all()
|
||||
await api.regions.load()
|
||||
const regions = await api.regions.all()
|
||||
let regions = await api.regions.all()
|
||||
regions = regions.filter(r => r.code !== 'INT')
|
||||
await api.subdivisions.load()
|
||||
const subdivisions = await api.subdivisions.all()
|
||||
|
||||
const output = []
|
||||
let output = []
|
||||
for (const country of countries) {
|
||||
let countryRegionCodes = _.filter(regions, { countries: [country.code] }).map(
|
||||
r => `r/${r.code}`
|
||||
|
@ -40,5 +41,13 @@ module.exports = async function (streams = []) {
|
|||
}
|
||||
}
|
||||
|
||||
let intItems = _.filter(streams, stream => stream.broadcast_area.includes('r/INT'))
|
||||
output.push({
|
||||
filepath: `countries/int.m3u`,
|
||||
items: intItems
|
||||
})
|
||||
|
||||
output = output.filter(f => f.items.length > 0)
|
||||
|
||||
return output
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue