Updated list of supported categories

This commit is contained in:
freearhey 2019-09-14 03:08:20 +03:00
parent 5cb7941155
commit 0cce43c2c5
1 changed files with 5 additions and 4 deletions

View File

@ -6,7 +6,7 @@ const zlib = require("zlib")
const DOMParser = require('xmldom').DOMParser const DOMParser = require('xmldom').DOMParser
const urlParser = require('url') 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 = [ const blacklist = [
'80.80.160.168', // repeats on a loop '80.80.160.168', // repeats on a loop
@ -46,12 +46,12 @@ class Channel {
_getGroup(groupTitle) { _getGroup(groupTitle) {
if(!groupTitle) return '' 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) { if(groupIndex === -1) {
groupTitle = '' groupTitle = ''
} else { } else {
groupTitle = supportedGroups[groupIndex] groupTitle = supportedCategories[groupIndex]
} }
return groupTitle return groupTitle
@ -256,5 +256,6 @@ module.exports = {
checkCache, checkCache,
clearCache, clearCache,
validateUrl, validateUrl,
skipPlaylist skipPlaylist,
supportedCategories
} }