mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-30 19:38:28 +03:00
Change how video duration check works for submissions
This commit is contained in:
@@ -388,9 +388,12 @@ async function updateDataIfVideoDurationChange(videoID: VideoID, service: Servic
|
|||||||
// Only treat as difference if both the api duration and submitted duration have changed
|
// Only treat as difference if both the api duration and submitted duration have changed
|
||||||
if (videoDurationChanged(videoDuration) && (!videoDurationParam || videoDurationChanged(videoDurationParam))) {
|
if (videoDurationChanged(videoDuration) && (!videoDurationParam || videoDurationChanged(videoDurationParam))) {
|
||||||
// Hide all previous submissions
|
// Hide all previous submissions
|
||||||
for (const submission of previousSubmissions) {
|
await db.prepare("run", `UPDATE "sponsorTimes" SET "hidden" = 1
|
||||||
await db.prepare("run", `UPDATE "sponsorTimes" SET "hidden" = 1 WHERE "UUID" = ?`, [submission.UUID]);
|
WHERE "videoID" = ? AND "service" = ? AND "videoDuration" != ?
|
||||||
}
|
AND "hidden" = 0 AND "shadowHidden" = 0 AND
|
||||||
|
"actionType" != 'full' AND "votes" > -2`,
|
||||||
|
[videoID, service, videoDuration]);
|
||||||
|
|
||||||
lockedCategoryList = [];
|
lockedCategoryList = [];
|
||||||
deleteLockCategories(videoID, null, null, service).catch((e) => Logger.error(`deleting lock categories: ${e}`));
|
deleteLockCategories(videoID, null, null, service).catch((e) => Logger.error(`deleting lock categories: ${e}`));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user