From b95e9e25f60908eaf3bed826ca77a20c59ecb191 Mon Sep 17 00:00:00 2001 From: freearhey Date: Wed, 22 Apr 2020 17:49:04 +0300 Subject: [PATCH] Fixes missing languages Closes #1249 --- scripts/update-readme.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/update-readme.js b/scripts/update-readme.js index 6bc9833c29..12a9a8f072 100644 --- a/scripts/update-readme.js +++ b/scripts/update-readme.js @@ -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 {