Update parser.js

This commit is contained in:
freearhey 2021-05-07 18:34:09 +03:00
parent 0890ef74a9
commit 9e29c55e55
1 changed files with 6 additions and 0 deletions

View File

@ -3,6 +3,8 @@ const utils = require('./utils')
const categories = require('./categories') const categories = require('./categories')
const path = require('path') const path = require('path')
const sfwCategories = categories.filter(c => !c.nsfw).map(c => c.name)
const parser = {} const parser = {}
parser.parseIndex = function () { parser.parseIndex = function () {
@ -226,6 +228,10 @@ class Channel {
} }
} }
} }
isSFW() {
return sfwCategories.includes(this.category)
}
} }
module.exports = parser module.exports = parser