mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-15 07:57:05 +03:00
Fixed getSavedTimeForUser to ignore low voted or shadow hidden submissions.
This commit is contained in:
2
index.js
2
index.js
@@ -577,7 +577,7 @@ app.get('/api/getSavedTimeForUser', function (req, res) {
|
|||||||
userID = getHash(userID);
|
userID = getHash(userID);
|
||||||
|
|
||||||
//up the view count by one
|
//up the view count by one
|
||||||
db.prepare("SELECT SUM((endTime - startTime) / 60 * views) as minutesSaved FROM sponsorTimes WHERE userID = ?").get(userID, function(err, row) {
|
db.prepare("SELECT SUM((endTime - startTime) / 60 * views) as minutesSaved FROM sponsorTimes WHERE userID = ? AND votes > -1 AND shadowHidden != 1 ").get(userID, function(err, row) {
|
||||||
if (err) console.log(err);
|
if (err) console.log(err);
|
||||||
|
|
||||||
if (row.minutesSaved != null) {
|
if (row.minutesSaved != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user