From 546ab6a69cb2a0da4ef6d2a86a219aeef304d511 Mon Sep 17 00:00:00 2001
From: freearhey <free.arhey@gmail.com>
Date: Sun, 7 Mar 2021 14:17:54 +0300
Subject: [PATCH] Update parser.js

Skip playlist when it fills tvg-name
---
 scripts/parser.js | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/scripts/parser.js b/scripts/parser.js
index 3a53eccbf..5def3eacb 100644
--- a/scripts/parser.js
+++ b/scripts/parser.js
@@ -172,7 +172,13 @@ class Channel {
   }
 
   get tvgName() {
-    return this.tvg.name || this.name
+    if (this.tvg.name) {
+      return this.tvg.name
+    } else if (this.filename !== 'unsorted') {
+      return this.name.replace(/\"/gi, '')
+    }
+
+    return ''
   }
 
   toString(short = false) {