mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-11-10 09:07:47 +01:00
Removed shadow hidden submissions from stats.
This commit is contained in:
parent
17f7e618ec
commit
aae0a6f9d4
1 changed files with 1 additions and 1 deletions
2
index.js
2
index.js
|
@ -625,7 +625,7 @@ app.get('/api/getTopUsers', function (req, res) {
|
|||
let totalSubmissions = [];
|
||||
let minutesSaved = [];
|
||||
|
||||
db.prepare("SELECT sponsorTimes.userID as userID, COUNT(*) as totalSubmissions, SUM(views) as viewCount, SUM((sponsorTimes.endTime - sponsorTimes.startTime) / 60 * sponsorTimes.views) as minutesSaved, userNames.userName as userName FROM sponsorTimes LEFT JOIN userNames ON sponsorTimes.userID=userNames.userID WHERE sponsorTimes.votes > -1 GROUP BY sponsorTimes.userID ORDER BY " + sortBy + " DESC LIMIT 100").all(function(err, rows) {
|
||||
db.prepare("SELECT sponsorTimes.userID as userID, COUNT(*) as totalSubmissions, SUM(views) as viewCount, SUM((sponsorTimes.endTime - sponsorTimes.startTime) / 60 * sponsorTimes.views) as minutesSaved, userNames.userName as userName FROM sponsorTimes LEFT JOIN userNames ON sponsorTimes.userID=userNames.userID WHERE sponsorTimes.votes > -1 AND sponsorTimes.shadowHidden != 1 GROUP BY sponsorTimes.userID ORDER BY " + sortBy + " DESC LIMIT 100").all(function(err, rows) {
|
||||
for (let i = 0; i < rows.length; i++) {
|
||||
if (rows[i].userName != null) {
|
||||
userNames[i] = rows[i].userName;
|
||||
|
|
Loading…
Reference in a new issue