mirror of
https://github.com/revanced/revanced-integrations.git
synced 2024-12-25 04:05:50 +01:00
fix(YouTube - SponsorBlock): Fix skip highlight button showing when set to 'show in seekbar'
This commit is contained in:
parent
8ef81235d7
commit
ea7bc57375
@ -50,7 +50,7 @@ public class SegmentPlaybackController {
|
|||||||
private static SponsorSegment[] segments;
|
private static SponsorSegment[] segments;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Highlight segment, if one exists.
|
* Highlight segment, if one exists and the skip behavior is not set to {@link CategoryBehaviour#SHOW_IN_SEEKBAR}.
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
private static SponsorSegment highlightSegment;
|
private static SponsorSegment highlightSegment;
|
||||||
@ -112,10 +112,13 @@ public class SegmentPlaybackController {
|
|||||||
segments = videoSegments;
|
segments = videoSegments;
|
||||||
calculateTimeWithoutSegments();
|
calculateTimeWithoutSegments();
|
||||||
|
|
||||||
for (SponsorSegment segment : videoSegments) {
|
if (SegmentCategory.HIGHLIGHT.behaviour == CategoryBehaviour.SKIP_AUTOMATICALLY
|
||||||
if (segment.category == SegmentCategory.HIGHLIGHT) {
|
|| SegmentCategory.HIGHLIGHT.behaviour == CategoryBehaviour.MANUAL_SKIP) {
|
||||||
highlightSegment = segment;
|
for (SponsorSegment segment : videoSegments) {
|
||||||
return;
|
if (segment.category == SegmentCategory.HIGHLIGHT) {
|
||||||
|
highlightSegment = segment;
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
highlightSegment = null;
|
highlightSegment = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user