mirror of
https://github.com/iptv-org/iptv
synced 2025-12-17 10:57:18 -05:00
Update countries.js
This commit is contained in:
@@ -7,11 +7,12 @@ module.exports = async function (streams = []) {
|
|||||||
await api.countries.load()
|
await api.countries.load()
|
||||||
const countries = await api.countries.all()
|
const countries = await api.countries.all()
|
||||||
await api.regions.load()
|
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()
|
await api.subdivisions.load()
|
||||||
const subdivisions = await api.subdivisions.all()
|
const subdivisions = await api.subdivisions.all()
|
||||||
|
|
||||||
const output = []
|
let output = []
|
||||||
for (const country of countries) {
|
for (const country of countries) {
|
||||||
let countryRegionCodes = _.filter(regions, { countries: [country.code] }).map(
|
let countryRegionCodes = _.filter(regions, { countries: [country.code] }).map(
|
||||||
r => `r/${r.code}`
|
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
|
return output
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user