From 0cce43c2c53fb7fe74a35e2e2944a11576e2d943 Mon Sep 17 00:00:00 2001 From: freearhey Date: Sat, 14 Sep 2019 03:08:20 +0300 Subject: [PATCH] Updated list of supported categories --- helpers/util.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/helpers/util.js b/helpers/util.js index 0180963b3a..2a5754b78e 100644 --- a/helpers/util.js +++ b/helpers/util.js @@ -6,7 +6,7 @@ const zlib = require("zlib") const DOMParser = require('xmldom').DOMParser const urlParser = require('url') -const supportedGroups = [ 'Auto','Business', 'CCTV', 'Classic','Comedy','Documentary','Education','Entertainment', 'Family','Fashion','Food', 'General', 'Health', 'History', 'Hobby', 'Kids', 'Legislative','Lifestyle','Local', 'Movies', 'Music', 'News', 'Quiz','Radio', 'Religious','Sci-Fi', 'Shop', 'Sport', 'Travel', 'Weather', 'XXX' ] +const supportedCategories = [ 'Auto','Business', 'Classic','Comedy','Documentary','Education','Entertainment', 'Family','Fashion','Food', 'General', 'Health', 'History', 'Hobby', 'Kids', 'Legislative','Lifestyle','Local', 'Movies', 'Music', 'News', 'Quiz', 'Religious','Sci-Fi', 'Shop', 'Sport', 'Travel', 'Weather', 'XXX' ] const blacklist = [ '80.80.160.168', // repeats on a loop @@ -46,12 +46,12 @@ class Channel { _getGroup(groupTitle) { if(!groupTitle) return '' - const groupIndex = supportedGroups.map(g => g.toLowerCase()).indexOf(groupTitle.toLowerCase()) + const groupIndex = supportedCategories.map(g => g.toLowerCase()).indexOf(groupTitle.toLowerCase()) if(groupIndex === -1) { groupTitle = '' } else { - groupTitle = supportedGroups[groupIndex] + groupTitle = supportedCategories[groupIndex] } return groupTitle @@ -256,5 +256,6 @@ module.exports = { checkCache, clearCache, validateUrl, - skipPlaylist + skipPlaylist, + supportedCategories } \ No newline at end of file