Update db.js

This commit is contained in:
freearhey 2021-02-10 17:10:27 +03:00
parent bace0e81d6
commit f366bb7b5f
1 changed files with 5 additions and 0 deletions

View File

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