nikclayton / android-squeezer

Android SqueezeCenter / SqueezeBox remote control client.
https://nikclayton.github.io/android-squeezer/
Apache License 2.0
100 stars 42 forks source link

Home screen widget gives player not found toast frequently #645

Closed idontusenumbers closed 4 years ago

idontusenumbers commented 4 years ago
kaaholst commented 4 years ago

Yes that's right.

Do you want me to look into it, or would you rather do it yourself?

Also it could be considered what to do if the selected player is controlled by another server than the one Squeezer is currently configured to. E.g because there multiple servers at one location or servers at different locations. The current action is to display player not found toast. This is maybe the proper thing to do?

idontusenumbers commented 4 years ago

I suspect multiple servers is pretty unusual; I suspect the best outcome would be squeezer service is launched and connects to the server the player is on for which the widget is controlling. The widget code would need to be updated to store the server information along with the player. I suspect we could add the player name as well so the toasts are more user friendly.

Coordinating the service and connectivity is on the fringe of my comfort level. Although I feel bad tossing the widget in in a buggy state and asking for you to take over.

kaaholst commented 4 years ago

@idontusenumbers I wanted to look into this, but I can't reproduce item no 2. Do you know how to reliably trigger this?

idontusenumbers commented 4 years ago

to trigger 1:

  1. open squeezer
  2. invoke widget (squeezer reacts)
  3. expand notification entry and tap disc button (squeezer closes)
  4. invoke widget (widget displays toast that player cannot be found)
  5. open squeezer (squeezer asks to select server, I simply click connect to reconnect to already populated server based on previous instance I suspect)

trigger 2: I'm not sure its the same but if I re open squeezer but don't connect, then wait a while, then invoke widget, widget seems to work fine. it might be the auto reconnect feature not reconnecting instantly or maybe reconnecting in the background.

kaaholst commented 4 years ago

ok thanks, I'm off the net for a week or so, I will look into it when I get back.

kaaholst commented 4 years ago

This is now ready in the develop branch. While at it I changed to localized Player Not Found toasts, and added shortcuts for the Now Playing and Current Playlist screens.