mirror of
https://github.com/yattee/yattee.git
synced 2024-12-25 06:53:42 +00:00
Don't skip segments that start before 4 seconds
To minimize buffering
This commit is contained in:
parent
7abe754cef
commit
a67a96cfa0
@ -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