Fix hiding segments not working on videos with YouTube chapters

Fixes #2194
This commit is contained in:
Ajay
2025-01-23 05:18:49 -05:00
parent 6965279d36
commit c3cbc44d28

View File

@@ -199,7 +199,7 @@ export default class Utils {
getSponsorIndexFromUUID(sponsorTimes: SponsorTime[], UUID: string): number {
for (let i = 0; i < sponsorTimes.length; i++) {
if (sponsorTimes[i].UUID.startsWith(UUID) || UUID.startsWith(sponsorTimes[i].UUID)) {
if (sponsorTimes[i].UUID && (sponsorTimes[i].UUID.startsWith(UUID) || UUID.startsWith(sponsorTimes[i].UUID))) {
return i;
}
}
@@ -320,6 +320,7 @@ export default class Utils {
allDownvotes[hashedVideoID] = currentVideoData;
}
console.log(allDownvotes)
const entries = Object.entries(allDownvotes);
if (entries.length > 10000) {