Fix NaN causing bad data

This commit is contained in:
ronaldheft 2022-08-22 17:27:55 -04:00
parent d084958f2d
commit fe042f3f83

View file

@ -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