mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-27 01:48:33 +03:00
Fix duplicate behavior with submitting full video labels
This commit is contained in:
@@ -329,13 +329,12 @@ async function checkEachSegmentValid(rawIP: IPAddress, paramUserID: UserID, user
|
|||||||
if (segments[i].actionType === ActionType.Full) {
|
if (segments[i].actionType === ActionType.Full) {
|
||||||
// Forward as vote
|
// Forward as vote
|
||||||
await vote(rawIP, duplicateCheck2Row.UUID, paramUserID, 1);
|
await vote(rawIP, duplicateCheck2Row.UUID, paramUserID, 1);
|
||||||
segments[i].ignoreSegment = true;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (segments.every((s) => s.ignoreSegment)) {
|
if (segments.every((s) => s.ignoreSegment && s.actionType !== ActionType.Full)) {
|
||||||
return { pass: false, errorMessage: "Segment has already been submitted before.", errorCode: 409 };
|
return { pass: false, errorMessage: "Segment has already been submitted before.", errorCode: 409 };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user