Fixes missing languages

Closes #1249
This commit is contained in:
freearhey 2020-04-22 17:49:04 +03:00
parent 7b5510e3a8
commit b95e9e25f6
1 changed files with 7 additions and 2 deletions

View File

@ -49,8 +49,13 @@ function parseIndex() {
// languages
const languageNames = item.tvg.language || 'Undefined'
for (let languageName of item.tvg.language.split(';')) {
const languageCode = helper.getISO6391Code(languageName) || 'undefined'
for (let languageName of languageNames.split(';')) {
let languageCode = 'undefined'
if (languageName !== 'Undefined') {
languageCode = helper.getISO6391Code(languageName)
if (!languageCode) continue
}
if (languages[languageCode]) {
languages[languageCode].channels++
} else {