mirror of
https://github.com/yattee/yattee.git
synced 2024-12-24 22:43:41 +00:00
Throttle SponsorBlock seek
This commit is contained in:
parent
3953bce8f8
commit
f32247d125
@ -250,6 +250,8 @@ final class MPVBackend: PlayerBackend {
|
||||
clientTimer.resume()
|
||||
}
|
||||
|
||||
private var handleSegmentsThrottle = Throttle(interval: 1)
|
||||
|
||||
private func getClientUpdates() {
|
||||
self.logger.info("getting client updates")
|
||||
|
||||
@ -262,9 +264,11 @@ final class MPVBackend: PlayerBackend {
|
||||
|
||||
model.updateNowPlayingInfo()
|
||||
|
||||
handleSegmentsThrottle.execute {
|
||||
if let currentTime = currentTime {
|
||||
model.handleSegments(at: currentTime)
|
||||
}
|
||||
}
|
||||
|
||||
timeObserverThrottle.execute {
|
||||
self.model.updateWatch()
|
||||
|
Loading…
Reference in New Issue
Block a user