Update parser.js
This commit is contained in:
parent
0890ef74a9
commit
9e29c55e55
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue