Update db.js

This commit is contained in:
Aleksandr Statciuk 2021-08-06 07:49:46 +03:00
parent 04ed1bf955
commit 9bab29bf38
1 changed files with 11 additions and 0 deletions

View File

@ -31,6 +31,7 @@ db.channels = {
list: [],
filter: null,
duplicates: true,
offline: true,
nsfw: true,
add(channel) {
this.list.push(channel)
@ -86,8 +87,13 @@ db.channels = {
output = output.filter(channel => !channel.isNSFW())
}
if (!this.offline) {
output = output.filter(channel => channel.status !== 'Offline')
}
this.nsfw = true
this.duplicates = true
this.offline = true
this.filter = null
return output
@ -102,6 +108,11 @@ db.channels = {
return this
},
removeOffline() {
this.offline = false
return this
},
all() {
return this.list
},