ignore segments with less than -1 votes

This commit is contained in:
James Robinson
2020-10-14 00:33:00 -05:00
parent 85dd187cb0
commit 2825cb63fb
2 changed files with 5 additions and 4 deletions

View File

@@ -402,7 +402,7 @@ module.exports = async function postSkipSegments(req, res) {
});
//get all segments for this video and user
let allSubmittedByUser = db.prepare('all', "SELECT startTime, endTime FROM sponsorTimes WHERE userID = ? and videoID = ?", [userID, videoID]);
let allSubmittedByUser = db.prepare('all', "SELECT startTime, endTime FROM sponsorTimes WHERE userID = ? and videoID = ? and votes > -1", [userID, videoID]);
let allSegmentTimes = [];
if (allSubmittedByUser !== undefined)
{