diff --git a/scripts/generators/languages.js b/scripts/generators/languages.js index eba2d8a8b9..d6ea90e753 100644 --- a/scripts/generators/languages.js +++ b/scripts/generators/languages.js @@ -1,11 +1,12 @@ -const api = require('../core/api') const _ = require('lodash') module.exports = async function (streams = []) { streams = _.filter(streams, stream => stream.is_nsfw === false) - await api.languages.load() - let languages = await api.languages.all() + let languages = [] + streams.forEach(stream => { + languages = languages.concat(stream.languages) + }) languages = _.uniqBy(languages, 'code') const output = []