Correct me if I’m wrong, but it looks like the play_media handler for the Plex component only supports a media_content_id of “video” which translates to “title” in the Plex API:
When the Plex component’s media_player.play_media method is called it does a lookup_media() against the plex server object.
plex_server.lookup_media() with media type MEDIA_TYPE_VIDEO calls the underlying PlexAPI library_section.get(), which only supports “title” at this time.
This causes issues when there are multiple titles / title collisions on the server; library_section.get() will return the first matching element. Since you can’t specify further element parameters we’re kind of stuck.
My first thought was to just add **kwargs to the underlying PlexAPI library_section.get() which would allow for those additional parameters to be simply passed from the HA Plex component to return the proper media element. I opened PR 554 on the PlexAPI project but it was closed on the grounds that it should be using library_section.all or the generic search to find the right element. I don’t really support that view as leaving it in the current state renders that entire function completely unreliable and useless (not to mention it narrows down the functionality of implementing the underlying Plex XML API), but I didn’t want to continue pursuing it without getting additional feedback.
My second thought would be to implement the search element in plex_server.lookup_media() with the caveat that it should only return one object, not a list or matching media. That sidesteps the entire .get() issue.
Any thoughts @jjlawren ? I could have this completely wrong as I just glanced over this stuff yesterday and today.