mirror of
https://github.com/yattee/yattee.git
synced 2025-01-06 01:20:31 +05:30
Minor SponsorBlock fix
This commit is contained in:
parent
0ed48bb5f9
commit
ef26f96f66
@ -129,7 +129,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 > 4,
|
segment.end < 4,
|
||||||
self.model.lastSkipped.isNil
|
self.model.lastSkipped.isNil
|
||||||
{
|
{
|
||||||
self.seek(to: segment.endTime) { finished in
|
self.seek(to: segment.endTime) { finished in
|
||||||
|
@ -24,7 +24,7 @@ extension PlayerModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if let segmentToSkip = nextSegments.last(where: { $0.endTime <= playerItemDuration ?? .zero }),
|
if let segmentToSkip = nextSegments.last(where: { $0.endTime <= playerItemDuration ?? .zero }),
|
||||||
self.shouldSkip(segmentToSkip, at: time)
|
shouldSkip(segmentToSkip, at: time)
|
||||||
{
|
{
|
||||||
skip(segmentToSkip, at: time)
|
skip(segmentToSkip, at: time)
|
||||||
}
|
}
|
||||||
@ -51,7 +51,7 @@ extension PlayerModel {
|
|||||||
guard isPlaying,
|
guard isPlaying,
|
||||||
!restoredSegments.contains(segment),
|
!restoredSegments.contains(segment),
|
||||||
Defaults[.sponsorBlockCategories].contains(segment.category),
|
Defaults[.sponsorBlockCategories].contains(segment.category),
|
||||||
segment.start > 4
|
segment.end < 4
|
||||||
else {
|
else {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user