mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-26 09:28:34 +03:00
Fix locked segment filtering for highlight and full video
This commit is contained in:
@@ -183,6 +183,10 @@ function getWeightedRandomChoice<T extends VotableObject>(choices: T[], amountOf
|
||||
const splitArray = partition(choices, predicate);
|
||||
filteredChoices = splitArray[0];
|
||||
forceIncludedChoices = splitArray[1];
|
||||
|
||||
if (filteredChoices.some((value) => value.locked)) {
|
||||
filteredChoices = filteredChoices.filter((value) => value.locked);
|
||||
}
|
||||
}
|
||||
|
||||
//assign a weight to each choice
|
||||
|
||||
Reference in New Issue
Block a user