mirror of
https://github.com/iptv-org/iptv
synced 2025-12-18 11:27:34 -05:00
Update parser.js
This commit is contained in:
@@ -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'
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user