Repository navigation
Publish the locked part of the queue as one queue field - #8246
Conversation
The buffered next item only counts as replaceable while an item follows it, so the published lock and every committed_index caller cover a buffered last item.
|
@Bot-MArley review |
Bot-MArley
left a comment
There was a problem hiding this comment.
Note
This comment was written by Claude and posted by Bot-MArley on behalf of the Music Assistant maintainers.
Thanks @marcelveldt! This moves the queue lock from an extra_attributes key to a PlayerQueue.last_locked_index field, folds the "buffered last track stays" rule into committed_index so delete_item and "play next" follow it, and points the MCP queue tools at the same lock. The logic and the API schema bump to 128 look right, the tests cover both the replaceable and the last-track cases, and no migration is needed because the old key never reached a release.
Requested changes
None. One heads-up, not a blocker: the pin is still music-assistant-models==1.1.252, and the field only exists from 1.1.254 (models#495). Until the pin moves, signal_update sets a plain attribute that isn't sent to clients, so make sure 1.1.254 or newer is in place before this lands.
I'm not approving it myself since it changes core code in the queue controller. It's a draft, and lint and test haven't run on this head yet. If you want an approval once it's ready, comment @Bot-MArley approve and I will.
cbe4b8e
into
feat/queue-replaceable-next-item
|
@Bot-MArley review |
|
Note This comment was posted by Bot-MArley on behalf of the Music Assistant maintainers. @MarvinSchenkel This PR was merged before I got to your |
What does this implement/fix?
Stacked on #8084. Clients get the locked part of the queue as one queue field,
last_locked_index, instead of anextra_attributeskey next toindex_in_buffer. That one value tells every client which items it may move or remove, so none of them has to combine it withindex_in_bufferor repeat a server rule.Changes
PlayerQueue.last_locked_index(Add the locked part of the queue to the player queue models#495).delete_itemneeds no special case. "Play next" while the next track is the last one lands after it.Related issue (if applicable):
Types of changes
bugfixnew-featureenhancementnew-providerbreaking-changerefactordocumentationmaintenancecidependenciesChecklist
pre-commit run --all-filespasses.pytestpasses, and tests have been added/updated undertests/where applicable.music-assistant/modelsis linked.music-assistant/frontendis linked.