-
-
Notifications
You must be signed in to change notification settings - Fork 207
Plex: added remote control feature #2608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Plex: added remote control feature #2608
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds Plex remote control functionality to Music Assistant, enabling Plex clients (like Plexamp) to discover and control Music Assistant players. The implementation includes GDM (Good Day Mate) discovery protocol support, HTTP endpoints for playback control, and player state synchronization between Plex and Music Assistant.
Key Changes:
- Implements per-player remote control instances with unique client IDs
- Adds GDM broadcasting for player discovery by Plex clients
- Provides HTTP API endpoints for playback control, timeline updates, and play queue management
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| music_assistant/providers/plex/player_remote.py | Core implementation of player manager, remote control instances, and HTTP server for handling Plex commands |
| music_assistant/providers/plex/gdm.py | GDM advertiser implementation for player discovery via UDP broadcasts |
| music_assistant/providers/plex/helpers.py | Added utility function to determine local IP address |
| music_assistant/providers/plex/init.py | Integration of PlexPlayerManager with configuration entries for remote control |
Comments suppressed due to low confidence (1)
music_assistant/providers/plex/gdm.py:215
- Variable bytes_sent is not used.
bytes_sent = self._broadcast_socket.sendto(
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e531ec6 to
f13cd1b
Compare
f13cd1b to
26c6d4a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| self._unsub_callbacks.append( | ||
| self.provider.mass.subscribe(self._handle_queue_event, EventType.QUEUE_UPDATED) | ||
| ) | ||
| self._unsub_callbacks.append( | ||
| self.provider.mass.subscribe(self._handle_queue_event, EventType.QUEUE_TIME_UPDATED) | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can just subscribe to player_updated nowadays. we have updated the player model and player.current_media will now always contain the translated metadata from any source
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it still possible to subscribe to separate events?
|
As stated in the comments, my first feeling is that this is a separate, dedicated plugin provider and has little to do with the Plex music provider. It would be good to clarify exactly what this does and who can use it. Like for example, will this work regardless if you are an actual plex user ? |
|
First let met thank you for reviewing the PR. I understand your concern, my main motivation for making it part of the plex provider was to avoid duplicating Plex credentials. Looking at the amount of code this PR adds, I can agree that this should become its own separate plugin. My question now is, could the |
|
@marcelveldt |
|
Does the plugin work without a Plex server? Does it just mimic a Plex server so you can allow any MA player with any MA music source? If it still relies on a Plex server, then you can can choose either between including it in the Plex music provider (while keeping the code maintainable) or isolate it into its own plugin. You can even add a "depends_on" in the manifest of the plugin to make it depend on Plex music provider. |
I have no preference. That is completely up to you |
d61780e to
79d924c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 5 out of 6 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 5 out of 6 changed files in this pull request and generated 17 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "codeowners": ["@anatosun"], | ||
| "requirements": ["plexapi==4.17.1"], | ||
| "icon": "mdi:plex", | ||
| "documentation": "https://music-assistant.io/plugin-support/plex_connect/", |
Copilot
AI
Nov 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation URL https://music-assistant.io/plugin-support/plex_connect/ is specified but this is a new plugin. Ensure that this documentation page exists or will be created before users encounter this plugin, otherwise users will face broken links when trying to learn about the plugin.
| "documentation": "https://music-assistant.io/plugin-support/plex_connect/", |
|
... and the documentation |
Plex Connect: new plugin for Plex discovery and control
This PR introduces Plex Connect, a new standalone plugin that enables Music Assistant players to be discovered and controlled by Plex clients like Plexamp when using Plex as a music source.
Functionalities
Plex Connect acts as a bridge between your Plex server and Music Assistant players, allowing Plex clients like Plexamp to discover and control your MA players. This plugin requires the Plex music provider to be configured as it works specifically with Plex music sources.
How It Works
Setup:
Discovery & Connection:
Control & Features:
Synchronization:
Comments
player_remote.py.