mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-12-02 13:04:14 +01:00
Refactor and clean up sync logic
This commit is contained in:
1 parent
062a217946
commit
972fbd42ee
4 files changed
+67
-72
No files matched your search
@@ -40,7 +40,7 @@ public class AbsAudioPlayer: CAPPlugin {
|
||||
// Fetch the most recent active session
|
||||
let activeSession = try await Realm().objects(PlaybackSession.self).where({ $0.isActiveSession == true }).last
|
||||
if let activeSession = activeSession {
|
||||
await PlayerProgress.syncLocalFromServer()
|
||||
await PlayerProgress.syncFromServer()
|
||||
try self.startPlaybackSession(activeSession, playWhenReady: false, playbackRate: PlayerSettings.main().playbackRate)
|
||||
}
|
||||
} catch {
|
||||
|
||||
Reference in new issue
Block a user