Update parser.js

pull/2733/head
freearhey 4 years ago
parent 0890ef74a9
commit 9e29c55e55

@ -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

Loading…
Cancel
Save