Update parser.js

This commit is contained in:
freearhey 2021-05-07 18:34:09 +03:00
parent 0890ef74a9
commit 9e29c55e55

View File

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