mirror of
https://github.com/iptv-org/iptv.git
synced 2025-05-11 17:40:03 -04:00
wip
This commit is contained in:
parent
e49dc7a39a
commit
42cbfcd7ad
2 changed files with 4 additions and 44 deletions
|
@ -2,11 +2,13 @@ const api = require('../core/api')
|
|||
const _ = require('lodash')
|
||||
|
||||
module.exports = async function (streams = []) {
|
||||
const output = []
|
||||
streams = _.filter(streams, s => !s.channel || s.channel.is_nsfw === false)
|
||||
|
||||
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)
|
||||
|
||||
const output = []
|
||||
for (const language of languages) {
|
||||
let items = _.filter(streams, { channel: { languages: [language.code] } })
|
||||
if (items.length) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue