Update languages.js
This commit is contained in:
parent
dc2cc12cc2
commit
0c7ff309bc
@ -1,11 +1,12 @@
|
|||||||
const api = require('../core/api')
|
|
||||||
const _ = require('lodash')
|
const _ = require('lodash')
|
||||||
|
|
||||||
module.exports = async function (streams = []) {
|
module.exports = async function (streams = []) {
|
||||||
streams = _.filter(streams, stream => stream.is_nsfw === false)
|
streams = _.filter(streams, stream => stream.is_nsfw === false)
|
||||||
|
|
||||||
await api.languages.load()
|
let languages = []
|
||||||
let languages = await api.languages.all()
|
streams.forEach(stream => {
|
||||||
|
languages = languages.concat(stream.languages)
|
||||||
|
})
|
||||||
languages = _.uniqBy(languages, 'code')
|
languages = _.uniqBy(languages, 'code')
|
||||||
|
|
||||||
const output = []
|
const output = []
|
||||||
|
Loading…
Reference in New Issue
Block a user