Merge pull request #1627 from mchangrh/partialRequredSegment

highlight partial required segments
This commit is contained in:
Ajay Ramachandran 2022-12-27 12:42:06 -05:00 committed by GitHub
commit b9b43513b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1421,6 +1421,7 @@ function updatePreviewBar(): void {
if (video === null) return;
const hashParams = getHashParams();
const requiredSegment = hashParams?.requiredSegment as SegmentUUID || undefined;
const previewBarSegments: PreviewBarSegment[] = [];
if (sponsorTimes) {
sponsorTimes.forEach((segment) => {
@ -1434,7 +1435,7 @@ function updatePreviewBar(): void {
showLarger: segment.actionType === ActionType.Poi,
description: segment.description,
source: segment.source,
requiredSegment: hashParams.requiredSegment && segment.UUID === hashParams.requiredSegment
requiredSegment: requiredSegment && (segment.UUID === requiredSegment || segment.UUID.startsWith(requiredSegment))
});
});
}