diff --git a/DynamicIsland/MediaControllers/NowPlayingController.swift b/DynamicIsland/MediaControllers/NowPlayingController.swift index f357908..2c0faa0 100644 --- a/DynamicIsland/MediaControllers/NowPlayingController.swift +++ b/DynamicIsland/MediaControllers/NowPlayingController.swift @@ -181,18 +181,9 @@ final class NowPlayingController: ObservableObject, MediaControllerProtocol { newPlaybackState.album = payload.album ?? (diff ? self.playbackState.album : "") newPlaybackState.duration = payload.duration ?? (diff ? self.playbackState.duration : 0) - if let elapsedTime = payload.elapsedTime { - newPlaybackState.currentTime = elapsedTime - } else if diff { - if payload.playing == false { - let timeSinceLastUpdate = Date().timeIntervalSince(self.playbackState.lastUpdated) - newPlaybackState.currentTime = self.playbackState.currentTime + (self.playbackState.playbackRate * timeSinceLastUpdate) - } else { - newPlaybackState.currentTime = self.playbackState.currentTime - } - } else { - newPlaybackState.currentTime = 0 - } + // Match boring.notch behavior: if elapsedTime is provided use it, + // if this update is a diff keep the previous currentTime, otherwise default to 0. + newPlaybackState.currentTime = payload.elapsedTime ?? (diff ? self.playbackState.currentTime : 0) if let shuffleMode = payload.shuffleMode {