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