kaaholst / android-squeezer

Remote control for your Logitech Media Server ("Squeezeserver" etc) and players.
Apache License 2.0
75 stars 15 forks source link

"Home list" popup menu misbehaving after server upgrade? database rebuild? #783

Open climategadgets opened 1 year ago

climategadgets commented 1 year ago

Oh boy, is this a weird one :)

Expected Behavior

A song on a "home list" displays a popup menu when the three dot menu is short pressed

Actual Behavior

The action results in an endlessly spinning circle

Contributing Factors

This has been observed for only old entries after the server upgrade from 7.9 to 8.3 (which, in turn, requested a full database rebuild because the schema changed). Entries added to the home list after the upgrade behave normally. It is as if the menu is built using transient identifiers that are wiped out either by a server upgrade, or a database rebuild.

kaaholst commented 1 year ago

Hi,

Sorry for the late answer. If you still experience this, I suggest trying the forum. I think it's a server (LMS) issue. Server logs may give the asnwer.

Here's how Squeezer works. There are more details, but in principle it's like this. When we display a page, we display the items we receive from LMS. For each item, we may receive a “go” action and a “more” action. When an item is selected, we send the go action to LMS, and display the items we receive on a new page. When the three dot menu is selected, we send the more action to LMS and display the items we receive in a popup. While waiting for the items, we display a spinning circle. If the spinning circle pertains, it is because we don't receive a response from LMS.

climategadgets commented 1 year ago

No worries, life is life.

Yep, you're describing exactly what I thought is going on behind the scenes. It may have been that the server was doing shadow rebuilds on old entries, and that was causing a delay.

The issue is no longer observed; I'll keep an eye on it during next server upgrade.

climategadgets commented 3 months ago

An update: it looks like it's the complete library rescan that causes this.

To Reproduce

  1. Add an item to the home screen by long pressing on a track in a list;
  2. Confirm that it is working correctly by pressing the triple dot menu;
  3. Perform a full library rescan.

Expected Behavior

Pressing the triple dot menu opens the floating action menu.

Actual Behavior

The action results in an endlessly spinning circle, as originally reported.

Additional Context

kaaholst commented 2 weeks ago

Thanks for the detailed information, well spotted! I think you're right, the references changes after a server rescan, which causes the configured shortcuts to fail. Squeezer keeps track of the time for last rescan, so we do know when there has been a rescan. We'll think about what we can do, it seems that attempting to use the meta-data is the best option.