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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user