mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-12 22:47:18 +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],
|
segment: segment.segment as [number, number],
|
||||||
category: segment.category,
|
category: segment.category,
|
||||||
unsubmitted: false,
|
unsubmitted: false,
|
||||||
|
actionType: segment.actionType,
|
||||||
showLarger: getCategoryActionType(segment.category) === CategoryActionType.POI
|
showLarger: getCategoryActionType(segment.category) === CategoryActionType.POI
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -991,11 +992,12 @@ function updatePreviewBar(): void {
|
|||||||
segment: segment.segment as [number, number],
|
segment: segment.segment as [number, number],
|
||||||
category: segment.category,
|
category: segment.category,
|
||||||
unsubmitted: true,
|
unsubmitted: true,
|
||||||
|
actionType: segment.actionType,
|
||||||
showLarger: getCategoryActionType(segment.category) === CategoryActionType.POI
|
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) {
|
if (Config.config.showTimeWithSkips) {
|
||||||
const skippedDuration = utils.getTimestampsDuration(previewBarSegments.map(({segment}) => segment));
|
const skippedDuration = utils.getTimestampsDuration(previewBarSegments.map(({segment}) => segment));
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ https://github.com/videosegments/videosegments/commits/f1e111bdfe231947800c6efdd
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import Config from "../config";
|
import Config from "../config";
|
||||||
|
import { ActionType } from "../types";
|
||||||
import Utils from "../utils";
|
import Utils from "../utils";
|
||||||
const utils = new Utils();
|
const utils = new Utils();
|
||||||
|
|
||||||
@@ -15,6 +16,7 @@ export interface PreviewBarSegment {
|
|||||||
segment: [number, number];
|
segment: [number, number];
|
||||||
category: string;
|
category: string;
|
||||||
unsubmitted: boolean;
|
unsubmitted: boolean;
|
||||||
|
actionType: ActionType;
|
||||||
showLarger: boolean;
|
showLarger: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user