This commit is contained in:
Aleksandr Statciuk
2022-02-07 03:05:43 +03:00
parent 86e0c2f7da
commit b535ff4059
10 changed files with 254 additions and 261 deletions

View File

@@ -7,6 +7,7 @@ module.exports = async function (streams = []) {
const countries = await api.countries.all()
await api.regions.load()
const regions = await api.regions.all()
streams = _.filter(streams, s => !s.channel || s.channel.is_nsfw === false)
for (const country of countries) {
const areaCodes = _.filter(regions, { countries: [country.code] }).map(r => r.code)
areaCodes.push(country.code)