mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-08 04:27:09 +03:00
Made it order the sponsor times by start time.
This commit is contained in:
2
index.js
2
index.js
@@ -36,7 +36,7 @@ app.get('/api/getVideoSponsorTimes', function (req, res) {
|
|||||||
let votes = []
|
let votes = []
|
||||||
let UUIDs = [];
|
let UUIDs = [];
|
||||||
|
|
||||||
db.prepare("SELECT startTime, endTime, votes, UUID FROM sponsorTimes WHERE videoID = ?").all(videoID, function(err, rows) {
|
db.prepare("SELECT startTime, endTime, votes, UUID FROM sponsorTimes WHERE videoID = ? ORDER BY startTime").all(videoID, function(err, rows) {
|
||||||
if (err) console.log(err);
|
if (err) console.log(err);
|
||||||
|
|
||||||
for (let i = 0; i < rows.length; i++) {
|
for (let i = 0; i < rows.length; i++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user