music-assistant / hass-music-assistant

Turn your Home Assistant instance into a jukebox, hassle free streaming of your favorite media to Home Assistant media players.
Apache License 2.0
1.21k stars 44 forks source link

Unfriendly error when player is selected but content is not #2446

Closed madbrain76 closed 2 weeks ago

madbrain76 commented 2 weeks ago

What version of Music Assistant has the issue?

2.0.4

What version of the Home Assistant Integration have you got installed?

2024.5.1

Have you tried everything in the Troubleshooting FAQ and reviewed the Open and Closed Issues and Discussions to resolve this yourself?

The problem

A red message stating "resume queue requested but queue xxxx-yyyy-zzzz is empty" appears

How to reproduce

  1. go to the home screen
  2. select a player (I used a CCA)
  3. click the icon on the left thats list the player name to open the player view
  4. the play button is greyed
  5. but you can click it anyway
  6. this leads to the unfriendly message appearance

Music Providers

file system (remote share)

Player Providers

Chromecast

Full log output

log.txt

Additional information

No response

What version of Home Assistant Core are your running

2024.6.2

What type of installation are you running?

Home Assistant OS

On what type of hardware are you running?

Windows

marcelveldt commented 2 weeks ago

What is unfriendly about it ?

madbrain76 commented 2 weeks ago

The queue ID is not particularly friendly to have in an error message, at least not for something user-facing. Since the button is greyed out, simply not letting you click / not displaying anything at all would be a better option.

Ideally, it should be more along the lines of "you need to select content", similar to what happens if you fail to select a player, select content, and try to play it.

marcelveldt commented 2 weeks ago

Well, yes, but we have 1000000 other stuff still left to do with higher priority than that. This project still very much in early phase so there will be more stuff like this. I don't think this is worth a bug report but more a feature request or a PR to fix it yourself.

I don't disagree with you btw but we have super limited capacity and a high load of incoming requests. I'm going to mark this as an enhancement and not bug report.

if one of us is working in this area one of these days we can have a look at disabling the button but be aware that this is much more complicated than you think it is. For example a player could have loaded some other source than MA etc. At least throwing some error is in that case better than silently ignoring it.