diff --git a/scripts/db.js b/scripts/db.js index b69483984..73012da42 100644 --- a/scripts/db.js +++ b/scripts/db.js @@ -34,6 +34,11 @@ db.channels = { all() { return this.list }, + sfw() { + const sfwCategories = categories.filter(c => !c.nsfw).map(c => c.name) + + return this.list.filter(i => sfwCategories.includes(i.category)) + }, forCountry(country) { if (!country.code) return this.list.filter(channel => !channel.countries.length)