mirror of
https://github.com/yattee/yattee.git
synced 2025-01-10 11:30:32 +05:30
Throttle SponsorBlock seek
This commit is contained in:
parent
5cb2e1b8f0
commit
db85be76f7
@ -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,8 +264,10 @@ final class MPVBackend: PlayerBackend {
|
||||
|
||||
model.updateNowPlayingInfo()
|
||||
|
||||
if let currentTime = currentTime {
|
||||
model.handleSegments(at: currentTime)
|
||||
handleSegmentsThrottle.execute {
|
||||
if let currentTime = currentTime {
|
||||
model.handleSegments(at: currentTime)
|
||||
}
|
||||
}
|
||||
|
||||
timeObserverThrottle.execute {
|
||||
|
Loading…
Reference in New Issue
Block a user