mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-05 10:35:42 +02:00
Fix NaN causing bad data
This commit is contained in:
parent
d084958f2d
commit
fe042f3f83
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue