Update db.js
This commit is contained in:
parent
04ed1bf955
commit
9bab29bf38
|
@ -31,6 +31,7 @@ db.channels = {
|
||||||
list: [],
|
list: [],
|
||||||
filter: null,
|
filter: null,
|
||||||
duplicates: true,
|
duplicates: true,
|
||||||
|
offline: true,
|
||||||
nsfw: true,
|
nsfw: true,
|
||||||
add(channel) {
|
add(channel) {
|
||||||
this.list.push(channel)
|
this.list.push(channel)
|
||||||
|
@ -86,8 +87,13 @@ db.channels = {
|
||||||
output = output.filter(channel => !channel.isNSFW())
|
output = output.filter(channel => !channel.isNSFW())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!this.offline) {
|
||||||
|
output = output.filter(channel => channel.status !== 'Offline')
|
||||||
|
}
|
||||||
|
|
||||||
this.nsfw = true
|
this.nsfw = true
|
||||||
this.duplicates = true
|
this.duplicates = true
|
||||||
|
this.offline = true
|
||||||
this.filter = null
|
this.filter = null
|
||||||
|
|
||||||
return output
|
return output
|
||||||
|
@ -102,6 +108,11 @@ db.channels = {
|
||||||
|
|
||||||
return this
|
return this
|
||||||
},
|
},
|
||||||
|
removeOffline() {
|
||||||
|
this.offline = false
|
||||||
|
|
||||||
|
return this
|
||||||
|
},
|
||||||
all() {
|
all() {
|
||||||
return this.list
|
return this.list
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue