mirror of
https://github.com/anultravioletaurora/Jellify.git
synced 2025-12-20 13:00:10 -06:00
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:
BIN
assets/banner.png
Normal file
BIN
assets/banner.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 69 KiB |
@@ -58,9 +58,10 @@ export const PlayerProvider: () => React.JSX.Element = () => {
|
|||||||
|
|
||||||
if (event.lastTrack)
|
if (event.lastTrack)
|
||||||
if (isPlaybackFinished(event.lastPosition, event.lastTrack.duration ?? 1))
|
if (isPlaybackFinished(event.lastPosition, event.lastTrack.duration ?? 1))
|
||||||
await reportPlaybackCompleted(api, event.lastTrack as JellifyTrack)
|
reportPlaybackCompleted(api, event.lastTrack as JellifyTrack)
|
||||||
else await reportPlaybackStopped(api, event.lastTrack as JellifyTrack)
|
else reportPlaybackStopped(api, event.lastTrack as JellifyTrack)
|
||||||
|
|
||||||
|
reportPlaybackStarted(api, event.track)
|
||||||
break
|
break
|
||||||
|
|
||||||
case Event.PlaybackProgressUpdated:
|
case Event.PlaybackProgressUpdated:
|
||||||
|
|||||||
Reference in New Issue
Block a user