mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 21:43: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,
|
||||
let segment = self.model.sponsorBlock.segments.first,
|
||||
segment.start < 3,
|
||||
segment.start > 4,
|
||||
self.model.lastSkipped.isNil
|
||||
{
|
||||
self.seek(to: segment.endTime) { finished in
|
||||
|
@ -50,7 +50,8 @@ extension PlayerModel {
|
||||
private func shouldSkip(_ segment: Segment, at time: CMTime) -> Bool {
|
||||
guard isPlaying,
|
||||
!restoredSegments.contains(segment),
|
||||
Defaults[.sponsorBlockCategories].contains(segment.category)
|
||||
Defaults[.sponsorBlockCategories].contains(segment.category),
|
||||
segment.start > 4
|
||||
else {
|
||||
return false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user