mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-06 20:08:48 +02:00
Start of refactor
This commit is contained in:
@@ -15,8 +15,10 @@ class PlayerProgress {
|
||||
|
||||
private init() {}
|
||||
|
||||
public func syncFromPlayer() {
|
||||
public func syncFromPlayer() async {
|
||||
let backgroundToken = await UIApplication.shared.beginBackgroundTask(withName: "ABS:syncFromPlayer")
|
||||
updateLocalMediaProgressFromLocalSession()
|
||||
await UIApplication.shared.endBackgroundTask(backgroundToken)
|
||||
}
|
||||
|
||||
public func syncToServer() async {
|
||||
@@ -31,6 +33,10 @@ class PlayerProgress {
|
||||
await UIApplication.shared.endBackgroundTask(backgroundToken)
|
||||
}
|
||||
|
||||
private func updateLocalSessionFromPlayer() async {
|
||||
|
||||
}
|
||||
|
||||
private func updateLocalMediaProgressFromLocalSession() {
|
||||
guard let session = PlayerHandler.getPlaybackSession() else { return }
|
||||
guard session.isLocal else { return }
|
||||
|
||||
Reference in New Issue
Block a user