Fix progress sync not updating playback object

This commit is contained in:
ronaldheft
2022-08-21 10:59:43 -04:00
parent fca0fd7bbb
commit f335d8735f
2 changed files with 18 additions and 5 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ public class AbsAudioPlayer: CAPPlugin {
do {
// Fetch the most recent active session
let activeSession = try await Realm().objects(PlaybackSession.self).where({ $0.isActiveSession == true }).last
let activeSession = try await Realm().objects(PlaybackSession.self).where({ $0.isActiveSession == true }).last?.freeze()
if let activeSession = activeSession {
await PlayerProgress.syncFromServer()
try self.startPlaybackSession(activeSession, playWhenReady: false, playbackRate: PlayerSettings.main().playbackRate)