fix issue where playback reporting wouldn't always work (#620)

Fix playback reporting when the track changes over either via a skip or the previous track ending
This commit is contained in:
Violet Caulfield
2025-10-29 13:21:38 -05:00
committed by GitHub
parent b7444b9158
commit 0b0dba75c9
2 changed files with 3 additions and 2 deletions

BIN
assets/banner.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

View File

@@ -58,9 +58,10 @@ export const PlayerProvider: () => React.JSX.Element = () => {
if (event.lastTrack)
if (isPlaybackFinished(event.lastPosition, event.lastTrack.duration ?? 1))
await reportPlaybackCompleted(api, event.lastTrack as JellifyTrack)
else await reportPlaybackStopped(api, event.lastTrack as JellifyTrack)
reportPlaybackCompleted(api, event.lastTrack as JellifyTrack)
else reportPlaybackStopped(api, event.lastTrack as JellifyTrack)
reportPlaybackStarted(api, event.track)
break
case Event.PlaybackProgressUpdated: