From f53d664680df4e435381deb95499ecd25ac2be82 Mon Sep 17 00:00:00 2001 From: freearhey Date: Fri, 7 May 2021 19:18:31 +0300 Subject: [PATCH] Update parser.js --- scripts/parser.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/parser.js b/scripts/parser.js index b4ac08341..0e7e5e298 100644 --- a/scripts/parser.js +++ b/scripts/parser.js @@ -183,9 +183,7 @@ class Channel { return '' } - toString(raw = false) { - if (raw) return this.raw + '\n' - + getInfo() { 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}"` @@ -211,8 +209,10 @@ class Channel { return info } - toString(short = false) { - const info = this.getInfo(short) + toString(raw = false) { + if (raw) return this.raw + '\n' + + const info = this.getInfo() return '#EXTINF:' + info + '\n' + this.url + '\n' }