From 9e29c55e5561e338b7299dfc0303b9a04549d905 Mon Sep 17 00:00:00 2001 From: freearhey Date: Fri, 7 May 2021 18:34:09 +0300 Subject: [PATCH] Update parser.js --- scripts/parser.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/parser.js b/scripts/parser.js index 10bad2ca7..e91c14df7 100644 --- a/scripts/parser.js +++ b/scripts/parser.js @@ -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