mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-11-29 03:32:49 +01:00
Fix NaN causing bad data
This commit is contained in:
1 parent
d084958f2d
commit
fe042f3f83
1 file changed
+1
@@ -47,6 +47,7 @@ class PlayerProgress {
|
||||
|
||||
private func updateLocalSessionFromPlayer(currentTime: Double, includesPlayProgress: Bool) async -> PlaybackSession? {
|
||||
guard let session = PlayerHandler.getPlaybackSession() else { return nil }
|
||||
guard !currentTime.isNaN else { return nil } // Prevent bad data on player stop
|
||||
|
||||
let now = Date().timeIntervalSince1970 * 1000
|
||||
let lastUpdate = session.updatedAt ?? now
|
||||
|
||||
Reference in new issue
Block a user