mass_queue icon indicating copy to clipboard operation
mass_queue copied to clipboard

Adding tracks to a player intermittently causes the player to skip to the last track added

Open rjbutler opened this issue 9 months ago • 3 comments

I can reproduce this pretty consistently if I have mass_queue installed. It happens both when I use the MASS UI to add tracks and when I use music_assistant.play_media with the add enqueue type. It doesn't happen when I remove mass_queue. It might be a Music Assistant bug, but if so I'm pretty confident it's triggered by what mass_queue is doing. It happens maybe 20% of the time when I add tracks, but it's random.

params: domain: music_assistant service: play_media service_data: media_id: - Tom Petty & the Heartbreakers - Refugee media_type: track enqueue: add entity_id: - media_player.bobs_roam_3 target: entity_id: - media_player.bobs_roam_3

I'm using the Sonos provider and Apple Music. If I add multiple tracks, when it happens, it jumps to the final track in the list. If there are 10 tracks in the queue, it just skips past them.

I really want to use the player card, but unfortunately the skipping is too annoying so I have mass_queue removed.

Happy to provide whatever info you need.

rjbutler avatar Feb 16 '26 01:02 rjbutler

That wouldn't be from this integration. music_assistant.play_media is from the Music Assistant integration.

The Music Assistant Queue Actions integration doesn't have the ability to change the actively playing song. The closest it can do is reorder your queue but only when you use the actions.

The Music Assistant Player Card also only uses the MA and HA services to play media and change tracks.

droans avatar Feb 16 '26 12:02 droans

Yeah, I understand. Maybe listening to queue changes exposes a Music Assistant bug or something. Like I said, I can reproduce it easily with mass_queue installed but not at all without it so I thought I'd start with reporting it here.

rjbutler avatar Feb 16 '26 15:02 rjbutler

I dug a little deeper in to a similar issue in Music Assistant and found a race condition that I think this also fixed the report here: https://github.com/music-assistant/server/pull/3194. Not quite the same symptom, but related and I reinstalled mass-queue after fixing that and no longer see the issue I reported.

rjbutler avatar Feb 22 '26 04:02 rjbutler