Update format.js

This commit is contained in:
Aleksandr Statciuk 2021-10-23 06:25:53 +03:00
parent 80ce577313
commit 7888841f17
1 changed files with 7 additions and 2 deletions

View File

@ -237,8 +237,13 @@ function updateLogo(channel, data, epgData) {
} }
function updateTvgLanguage(channel, data) { function updateTvgLanguage(channel, data) {
if (!channel.tvg.language && data) { if (!channel.tvg.language) {
channel.tvg.language = data.languages.map(l => l.name).join(';') if (data) {
channel.tvg.language = data.languages.map(l => l.name).join(';')
} else if (channel.countries.length) {
const countryCode = channel.countries[0].code
channel.tvg.language = utils.country2language(countryCode)
}
} }
} }