fix: send last position for Stopped event

instead of the current position, which is `0` when we move to a new track
This commit is contained in:
Lei Nelissen
2024-07-21 22:10:10 +02:00
parent 746c96d459
commit 68c8808188
2 changed files with 5 additions and 4 deletions

View File

@@ -45,7 +45,7 @@ export default async function() {
if (settings.enablePlaybackReporting && 'track' in e) {
// GUARD: End the previous track if it's about to end
if (e.lastTrack) {
await sendPlaybackEvent('/Sessions/Playing/Stopped', e.lastTrack);
await sendPlaybackEvent('/Sessions/Playing/Stopped', e.lastTrack, e.lastPosition);
}
await sendPlaybackEvent('/Sessions/Playing', e.track);