mirror of
https://github.com/iptv-org/iptv
synced 2025-12-18 11:27:34 -05:00
Update languages.js
This commit is contained in:
@@ -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 = []
|
||||||
|
|||||||
Reference in New Issue
Block a user