mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-12 06:27:10 +03:00
Treat segments where end time of one equals start time of the other as not overlapping
This commit is contained in:
@@ -218,7 +218,7 @@ async function chooseSegments(segments: DBSegment[], max: number): Promise<DBSeg
|
||||
let currentGroup: OverlappingSegmentGroup;
|
||||
let cursor = -1; //-1 to make sure that, even if the 1st segment starts at 0, a new group is created
|
||||
for (const segment of segments) {
|
||||
if (segment.startTime > cursor) {
|
||||
if (segment.startTime >= cursor) {
|
||||
currentGroup = {segments: [], votes: 0, reputation: 0, locked: false, required: false};
|
||||
overlappingSegmentsGroups.push(currentGroup);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user