mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-13 06:57:09 +03:00
Don't show full segments on preview bar
This commit is contained in:
@@ -981,6 +981,7 @@ function updatePreviewBar(): void {
|
||||
segment: segment.segment as [number, number],
|
||||
category: segment.category,
|
||||
unsubmitted: false,
|
||||
actionType: segment.actionType,
|
||||
showLarger: getCategoryActionType(segment.category) === CategoryActionType.POI
|
||||
});
|
||||
});
|
||||
@@ -991,11 +992,12 @@ function updatePreviewBar(): void {
|
||||
segment: segment.segment as [number, number],
|
||||
category: segment.category,
|
||||
unsubmitted: true,
|
||||
actionType: segment.actionType,
|
||||
showLarger: getCategoryActionType(segment.category) === CategoryActionType.POI
|
||||
});
|
||||
});
|
||||
|
||||
previewBar.set(previewBarSegments, video?.duration)
|
||||
previewBar.set(previewBarSegments.filter((segment) => segment.actionType !== ActionType.Full), video?.duration)
|
||||
|
||||
if (Config.config.showTimeWithSkips) {
|
||||
const skippedDuration = utils.getTimestampsDuration(previewBarSegments.map(({segment}) => segment));
|
||||
|
||||
@@ -6,6 +6,7 @@ https://github.com/videosegments/videosegments/commits/f1e111bdfe231947800c6efdd
|
||||
'use strict';
|
||||
|
||||
import Config from "../config";
|
||||
import { ActionType } from "../types";
|
||||
import Utils from "../utils";
|
||||
const utils = new Utils();
|
||||
|
||||
@@ -15,6 +16,7 @@ export interface PreviewBarSegment {
|
||||
segment: [number, number];
|
||||
category: string;
|
||||
unsubmitted: boolean;
|
||||
actionType: ActionType;
|
||||
showLarger: boolean;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user