mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-06 11:36:58 +03:00
Merge branch 'master' of https://github.com/ajayyy/SponsorBlockServer
This commit is contained in:
@@ -22,7 +22,8 @@ async function generateTopUsersStats(sortBy: string, categoryStatsEnabled = fals
|
||||
SUM(CASE WHEN category = 'interaction' THEN 1 ELSE 0 END) as "categorySumInteraction",
|
||||
SUM(CASE WHEN category = 'selfpromo' THEN 1 ELSE 0 END) as "categorySelfpromo",
|
||||
SUM(CASE WHEN category = 'music_offtopic' THEN 1 ELSE 0 END) as "categoryMusicOfftopic",
|
||||
SUM(CASE WHEN category = 'preview' THEN 1 ELSE 0 END) as "categorySumPreview", `;
|
||||
SUM(CASE WHEN category = 'preview' THEN 1 ELSE 0 END) as "categorySumPreview",
|
||||
SUM(CASE WHEN category = 'poi_highlight' THEN 1 ELSE 0 END) as "categorySumHighlight", `;
|
||||
}
|
||||
|
||||
const rows = await db.prepare("all", `SELECT COUNT(*) as "totalSubmissions", SUM(views) as "viewCount",
|
||||
@@ -47,7 +48,8 @@ async function generateTopUsersStats(sortBy: string, categoryStatsEnabled = fals
|
||||
rows[i].categorySumInteraction,
|
||||
rows[i].categorySelfpromo,
|
||||
rows[i].categoryMusicOfftopic,
|
||||
rows[i].categorySumPreview
|
||||
rows[i].categorySumPreview,
|
||||
rows[i].categorySumHighlight
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -254,7 +254,7 @@ describe("getSkipSegmentsByHash", () => {
|
||||
});
|
||||
|
||||
it("Should only return one segment when fetching highlight segments", (done: Done) => {
|
||||
fetch(`${getbaseURL()}/api/skipSegments/c962?category=highlight`)
|
||||
fetch(`${getbaseURL()}/api/skipSegments/c962?category=poi_highlight`)
|
||||
.then(async res => {
|
||||
assert.strictEqual(res.status, 200);
|
||||
const data = await res.json();
|
||||
|
||||
Reference in New Issue
Block a user