mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-27 13:54:01 +02:00
Refactor and clean up sync logic
This commit is contained in:
@@ -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