mirror of
https://github.com/yattee/yattee.git
synced 2024-12-23 05:53:41 +00:00
Don't skip segments that start before 4 seconds
To minimize buffering
This commit is contained in:
parent
bdc83a7e7c
commit
bf46c36eca
@ -128,7 +128,7 @@ final class MPVBackend: PlayerBackend {
|
|||||||
|
|
||||||
if !preservingTime,
|
if !preservingTime,
|
||||||
let segment = self.model.sponsorBlock.segments.first,
|
let segment = self.model.sponsorBlock.segments.first,
|
||||||
segment.start < 3,
|
segment.start > 4,
|
||||||
self.model.lastSkipped.isNil
|
self.model.lastSkipped.isNil
|
||||||
{
|
{
|
||||||
self.seek(to: segment.endTime) { finished in
|
self.seek(to: segment.endTime) { finished in
|
||||||
|
@ -50,7 +50,8 @@ extension PlayerModel {
|
|||||||
private func shouldSkip(_ segment: Segment, at time: CMTime) -> Bool {
|
private func shouldSkip(_ segment: Segment, at time: CMTime) -> Bool {
|
||||||
guard isPlaying,
|
guard isPlaying,
|
||||||
!restoredSegments.contains(segment),
|
!restoredSegments.contains(segment),
|
||||||
Defaults[.sponsorBlockCategories].contains(segment.category)
|
Defaults[.sponsorBlockCategories].contains(segment.category),
|
||||||
|
segment.start > 4
|
||||||
else {
|
else {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user