mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-29 22:29:29 +02:00
Finish cleaning up some refactors
This commit is contained in:
parent
0f8672fb92
commit
a461ed43de
2 changed files with 4 additions and 8 deletions
|
@ -57,9 +57,9 @@ class PlayerHandler {
|
||||||
public static func startTickTimer() {
|
public static func startTickTimer() {
|
||||||
DispatchQueue.runOnMainQueue {
|
DispatchQueue.runOnMainQueue {
|
||||||
NSLog("Starting the tick timer")
|
NSLog("Starting the tick timer")
|
||||||
timer?.invalidate()
|
playingTimer?.invalidate()
|
||||||
pausedTimer?.invalidate()
|
pausedTimer?.invalidate()
|
||||||
timer = Timer.scheduledTimer(withTimeInterval: 1, repeats: true) { _ in
|
playingTimer = Timer.scheduledTimer(withTimeInterval: 1, repeats: true) { _ in
|
||||||
self.tick()
|
self.tick()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -67,9 +67,9 @@ class PlayerHandler {
|
||||||
|
|
||||||
public static func stopTickTimer() {
|
public static func stopTickTimer() {
|
||||||
NSLog("Stopping the tick timer")
|
NSLog("Stopping the tick timer")
|
||||||
timer?.invalidate()
|
playingTimer?.invalidate()
|
||||||
pausedTimer?.invalidate()
|
pausedTimer?.invalidate()
|
||||||
timer = nil
|
playingTimer = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
private static func startPausedTimer() {
|
private static func startPausedTimer() {
|
||||||
|
|
|
@ -29,10 +29,6 @@ class PlayerProgress {
|
||||||
await UIApplication.shared.endBackgroundTask(backgroundToken)
|
await UIApplication.shared.endBackgroundTask(backgroundToken)
|
||||||
}
|
}
|
||||||
|
|
||||||
private static func updateLocalSessionFromActivePlayer() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private static func updateLocalMediaProgressFromLocalSession() {
|
private static func updateLocalMediaProgressFromLocalSession() {
|
||||||
guard let session = PlayerHandler.getPlaybackSession() else { return }
|
guard let session = PlayerHandler.getPlaybackSession() else { return }
|
||||||
guard session.isLocal else { return }
|
guard session.isLocal else { return }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue