wip
This commit is contained in:
@@ -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)
|
||||
|
@@ -6,6 +6,7 @@ module.exports = async function (streams = []) {
|
||||
await api.languages.load()
|
||||
let languages = await api.languages.all()
|
||||
languages = _.uniqBy(languages, 'code')
|
||||
streams = _.filter(streams, s => !s.channel || s.channel.is_nsfw === false)
|
||||
for (const language of languages) {
|
||||
let items = _.filter(streams, { channel: { languages: [language.code] } })
|
||||
if (items.length) {
|
||||
|
@@ -5,6 +5,7 @@ module.exports = async function (streams = []) {
|
||||
const output = []
|
||||
await api.regions.load()
|
||||
const regions = await api.regions.all()
|
||||
streams = _.filter(streams, s => !s.channel || s.channel.is_nsfw === false)
|
||||
for (const region of regions) {
|
||||
const areaCodes = region.countries
|
||||
areaCodes.push(region.code)
|
||||
|
Reference in New Issue
Block a user