Skip to content

Feature/party multi instance#3448

Draft
apophisnow wants to merge 3 commits intomusic-assistant:devfrom
apophisnow:feature/party-multi-instance
Draft

Feature/party multi instance#3448
apophisnow wants to merge 3 commits intomusic-assistant:devfrom
apophisnow:feature/party-multi-instance

Conversation

@apophisnow
Copy link
Copy Markdown
Contributor

Companion to the frontend PR.

apophisnow and others added 2 commits March 20, 2026 21:59
- Enable multi_instance in manifest.json
- Namespace API commands by instance_id (party/{instanceId}/...)
- Filter player selection to warn about players used by other instances
- Add shared guest user (party_guest) with JWT extra_claims to
  differentiate instances (extra_claims.party_instance)
- Add instance_id column to join_codes table (DB schema v6)
- Add generate/exchange join code support for instance_id
- Add revoke_join_codes_for_instance and delete_user_internal helpers
- Clean up guest user only when last instance is removed

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Instead of labeling used players in the dropdown, filter them out
entirely so each player can only be assigned to one party instance.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 21, 2026

🔒 Dependency Security Report

✅ No dependency changes detected in this PR.

When multiple party instances exist, the guest view shows the instance
name between the logo and search bar so guests know which party they
joined.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
:param expires_in_hours: Hours until code expires (default: 8).
:param max_uses: Maximum number of uses (0 = unlimited).
:param device_name: Device name for tokens created with this code.
:param instance_id: Optional provider instance ID to embed in the resulting JWT.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
:param instance_id: Optional provider instance ID to embed in the resulting JWT.
:param provider_id: Optional provider instance ID to embed in the resulting JWT.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fid it a bit weird to embed a provider instance ID into a JWT token but if we have no choice, then please opt for a recognizable name such as provider_id or provider_instance_id

@marcelveldt
Copy link
Copy Markdown
Member

Questions:

  1. Why on earth would you want to host multiple parties at once in the same house ?
  2. How would this work in the frontend ? Multiple tabs in the menu or a selection screen ?

@apophisnow
Copy link
Copy Markdown
Contributor Author

Questions:

  1. Why on earth would you want to host multiple parties at once in the same house ?
  2. How would this work in the frontend ? Multiple tabs in the menu or a selection screen ?

There is a one to one mapping of the party instance and the player assigned to it. Each instance has its own QR code (which ends up giving you the JWT scoped to that instance). The use case is having a dashboard with convenient QR code login for various rooms. So people hanging out in the Living Room can use the Living Room party instance, and other rooms can have their own instances with their own queues.

To be fair, I do feel some of this is compensating for the fact that we currently have no anonymous login (other than the Party plugin), and don't yet have the granular permissions required to pull something like this off.

If we did have a way for people to log in with QR code, not needing the admin to create them an account, and those users could get a view which doesn't include certain functionality (volume control, or the ability to pause or skip tracks as an example), then much of this could probably integrate better.

For addidtional context, there has been some discussion on discord around it. https://discord.com/channels/753947050995089438/1483038553360437382/1483163113720119377

@marcelveldt
Copy link
Copy Markdown
Member

What I read in that thread on discord is more a request for a more granular guest/role system than having multiple parties in one home.

If there is a real usecase and demand I agree we should look into it but it will make it more difficult to setup and maintain.

So my advice is await feedback on the current party mode first and focus on high priority/demand bugs and requests

@apophisnow
Copy link
Copy Markdown
Contributor Author

What I read in that thread on discord is more a request for a more granular guest/role system than having multiple parties in one home.

If there is a real usecase and demand I agree we should look into it but it will make it more difficult to setup and maintain.

So my advice is await feedback on the current party mode first and focus on high priority/demand bugs and requests

I'm good with that. I'll convert this to a draft if that is OK, and we can wait and see.

@apophisnow apophisnow marked this pull request as draft March 22, 2026 20:09
@OzGav OzGav added this to the 2.8.0 milestone Mar 25, 2026
@MarvinSchenkel MarvinSchenkel modified the milestones: 2.8.0, 2.9.0 Mar 25, 2026
@MarvinSchenkel
Copy link
Copy Markdown
Contributor

@apophisnow I think the way forward here is to introduce as guest mode rather than making party mode multi-instance if I recall correctly?

@Hedda
Copy link
Copy Markdown

Hedda commented Apr 22, 2026

Why on earth would you want to host multiple parties at once in the same house ?

If there is a real usecase and demand I agree we should look into it but it will make it more difficult to setup and maintain.

@marcelveldt Having kids is the real usecase! Especially teenagagers who want to listen to their own music in their rooms.

  • One use case scenario is having one teenage son and one teenage daughter each having friends over in the own rooms.

  • Another use case scenario is so adults can have party in the living/dining-room while children have their own part in one of the childrens room or if you have other kid-friendly area in your home that is better soundproofed 😜

I can think of several more child-related scenarios why would want to host multiple parties at once in the same house.

Have been in many real world scenarios when have friends/family for parties when the guests have brought their own children in similar ages to ours, and then the "kids" will go to their own rooms to chill and entertain themselves with music while parents stay in the living/dining-room area to in turn play other music there, (i.e. hosting multiple parties simultaneously in the same house at the time).

So I think it would still be a good idea to have multi-instance party-mode support in Music Assistant in some scenarios.

In the end you can only listen to teen's and children's music songs so many times when trying to have a party for grownups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants