Update parser.js
This commit is contained in:
parent
5a2b11104b
commit
f53d664680
|
@ -183,9 +183,7 @@ class Channel {
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
|
|
||||||
toString(raw = false) {
|
getInfo() {
|
||||||
if (raw) return this.raw + '\n'
|
|
||||||
|
|
||||||
this.tvg.country = this.tvg.country.toUpperCase()
|
this.tvg.country = this.tvg.country.toUpperCase()
|
||||||
|
|
||||||
let info = `-1 tvg-id="${this.tvgId}" tvg-name="${this.tvgName}" tvg-country="${this.tvg.country}" tvg-language="${this.tvg.language}" tvg-logo="${this.logo}"`
|
let info = `-1 tvg-id="${this.tvgId}" tvg-name="${this.tvgName}" tvg-country="${this.tvg.country}" tvg-language="${this.tvg.language}" tvg-logo="${this.logo}"`
|
||||||
|
@ -211,8 +209,10 @@ class Channel {
|
||||||
return info
|
return info
|
||||||
}
|
}
|
||||||
|
|
||||||
toString(short = false) {
|
toString(raw = false) {
|
||||||
const info = this.getInfo(short)
|
if (raw) return this.raw + '\n'
|
||||||
|
|
||||||
|
const info = this.getInfo()
|
||||||
|
|
||||||
return '#EXTINF:' + info + '\n' + this.url + '\n'
|
return '#EXTINF:' + info + '\n' + this.url + '\n'
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue