mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-06 11:36:58 +03:00
Changed similar sponsor check to check if equal as well.
This commit is contained in:
4
index.js
4
index.js
@@ -698,8 +698,8 @@ function getVoteOrganisedSponsorTimes(sponsorTimes, votes, UUIDs) {
|
||||
|
||||
for (let i = 0; i < sponsorTimes.length; i++) {
|
||||
//see if the start time is located between the start and end time of the other sponsor time.
|
||||
for (let j = 0; j < sponsorTimes.length; j++) {
|
||||
if (sponsorTimes[j][0] > sponsorTimes[i][0] && sponsorTimes[j][0] < sponsorTimes[i][1]) {
|
||||
for (let j = i + 1; j < sponsorTimes.length; j++) {
|
||||
if (sponsorTimes[j][0] >= sponsorTimes[i][0] && sponsorTimes[j][0] <= sponsorTimes[i][1]) {
|
||||
//sponsor j is contained in sponsor i
|
||||
similarSponsors.push([i, j]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user