Skip to content

Commit c22a763

Browse files
committed
Fix issue with unfinished chapter submissions causing the seek bar to look wrong
1 parent abbab88 commit c22a763

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

src/content.ts

+11-9
Original file line numberDiff line numberDiff line change
@@ -1414,15 +1414,17 @@ function updatePreviewBar(): void {
14141414
}
14151415

14161416
sponsorTimesSubmitting.forEach((segment) => {
1417-
previewBarSegments.push({
1418-
segment: segment.segment as [number, number],
1419-
category: segment.category,
1420-
actionType: segment.actionType,
1421-
unsubmitted: true,
1422-
showLarger: segment.actionType === ActionType.Poi,
1423-
description: segment.description,
1424-
source: segment.source
1425-
});
1417+
if (segment.actionType !== ActionType.Chapter || segment.segment.length > 1) {
1418+
previewBarSegments.push({
1419+
segment: segment.segment as [number, number],
1420+
category: segment.category,
1421+
actionType: segment.actionType,
1422+
unsubmitted: true,
1423+
showLarger: segment.actionType === ActionType.Poi,
1424+
description: segment.description,
1425+
source: segment.source
1426+
});
1427+
}
14261428
});
14271429

14281430
previewBar.set(previewBarSegments.filter((segment) => segment.actionType !== ActionType.Full), getVideoDuration())

0 commit comments

Comments
 (0)