mirror of
https://github.com/iptv-org/iptv
synced 2025-12-16 10:26:48 -05:00
Update countries.js
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user