JurajNyiri / PlexMeetsHomeAssistant

Custom card which integrates plex into Home Assistant and makes it possible to launch movies or tv shows on TV with a simple click
Apache License 2.0
107 stars 8 forks source link

Bug: Albums with a name that is a subset of another album name don't play #88

Open HStep20 opened 1 year ago

HStep20 commented 1 year ago

Describe the bug

I have two albums which are both matched separately, and have their own metadata with individual titles, but trying to play "Risk of Rain 2" in the UI results in an error: Failed to call service media_player/play_media. Multiple matches, make content_id more specific or useallow_multiple: [<Album:346772:Risk-of-Rain-2>, <Album:346849:Risk-of-Rain-2:-Surv>]

For reference, they are these two video game soundtrack albums: Risk of Rain 2 Risk of Rain 2: Survivors of the Voide

The second album plays fine, so I can say with certainty that the problem is that the Title of Album 1 is a subset of Album 2, leading to the confusion of which album to play. I tested with the soundtrack of the first game titled "Risk of Rain" (another subset) and it showed a similar error, except listing the third album in the error as well

To Reproduce Steps to reproduce the behavior:

  1. Have at least two albums in the same library on plex, where one album name is the subset of another
  2. Create a card which you can access album with the subset name from
  3. Try to play the album in HA and get the error.

Expected behavior I expected it to play the album selected, regardless of name

Checks Please check below if true:

[x] I am running Home Assistant on HTTP protocol [ ] I am running BOTH Home Assistant AND Plex on HTTPS protocol [x] My Plex server is accessible through protocol, port and ip/hostname I have specified for the card. [ ] My Plex server is running on HTTPS and has a valid certificate.

Card Version 3.6.3

Plex Version Version 1.30.1.6497