highlight partial required segments

This commit is contained in:
Michael C
2022-12-26 20:18:51 -05:00
parent 27f3ced338
commit c5178b4c99

View File

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