mirror of
https://github.com/iptv-org/iptv.git
synced 2025-05-14 02:50:04 -04:00
Added support for multiple languages per channel
This commit is contained in:
parent
3dca4085e4
commit
56fae45453
2 changed files with 10 additions and 13 deletions
|
@ -224,7 +224,10 @@ class Channel {
|
|||
constructor(data) {
|
||||
this.id = data.tvg.id
|
||||
this.name = data.tvg.name
|
||||
this.language = this._filterLanguage(data.tvg.language)
|
||||
this.language = data.tvg.language
|
||||
.split(';')
|
||||
.filter(l => !!helper.getISO6391Code(l))
|
||||
.join(';')
|
||||
this.logo = data.tvg.logo
|
||||
this.group = this._filterGroup(data.group.title)
|
||||
this.url = data.url
|
||||
|
@ -280,14 +283,6 @@ class Channel {
|
|||
return groupTitle
|
||||
}
|
||||
|
||||
_filterLanguage(languageName) {
|
||||
if (helper.getISO6391Code(languageName)) {
|
||||
return languageName
|
||||
}
|
||||
|
||||
return ''
|
||||
}
|
||||
|
||||
toString() {
|
||||
const country = this.countryCode.toUpperCase()
|
||||
const epg = this.id && this.epg ? this.epg : ''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue