Update parser.js

This commit is contained in:
freearhey 2021-05-08 16:30:10 +03:00
parent 632b43f276
commit 96df545487
1 changed files with 2 additions and 4 deletions

View File

@ -63,8 +63,6 @@ class Channel {
this.countries = countryName ? [{ code: this.filename, name: countryName }] : [] this.countries = countryName ? [{ code: this.filename, name: countryName }] : []
this.tvg.country = this.countries.map(c => c.code.toUpperCase()).join(';') this.tvg.country = this.countries.map(c => c.code.toUpperCase()).join(';')
} }
this.tvg.url = header.attrs['x-tvg-url'] || ''
} }
parseData(data) { parseData(data) {
@ -160,7 +158,7 @@ class Channel {
} }
get tvgUrl() { get tvgUrl() {
return (this.tvg.id || this.tvg.name) && this.tvg.url ? this.tvg.url : '' return this.tvg.id && this.tvg.url ? this.tvg.url : ''
} }
get tvgId() { get tvgId() {
@ -228,7 +226,7 @@ class Channel {
tvg: { tvg: {
id: this.tvgId || null, id: this.tvgId || null,
name: this.tvgName || null, name: this.tvgName || null,
url: this.tvg.url || null url: this.tvgUrl || null
} }
} }
} }