BlitterStudio / MB_SubSonic

MusicBee SubSonic plugin
GNU General Public License v3.0
110 stars 14 forks source link

Multi-server support #68

Closed J4gQBqqR closed 1 year ago

J4gQBqqR commented 1 year ago

Hi, is it possible to support a fast dropdown menu that can enable convenient server switching between multiple servers?

midwan commented 1 year ago

Hi @J4gQBqqR It's possible to do that from the plugin's side, but it would need some work. How do you imagine this working?

  1. Multiple config "profiles", each one with the server and authentication settings? And you switch from one to the other in the plugin config window? Which would imply only one can be "Active" at any time.
  2. Multiple servers in MusicBee's window, with each one having their own content? This would imply they can all be Active simultaneously.
  3. Other idea (please describe in detail)?

Option 1 would be possible to do in the plugin alone. Option 2 might not be that easy, as it goes into MusicBee's territory and I'm not sure what kind of changes would be required.

J4gQBqqR commented 1 year ago

Hi, sorry for coming back late. As far as I know, all multi server support of Subsonic go with option 1, e.g. Dsub, sublime music, subtract.

I think it is enough and reasonable to have user switch server by themselves to see different contents.

In addition, is it easy enough to add the switch drop-down menu inside of the main GUI instead of the plugin config window? That would improve usability.

midwan commented 1 year ago

@J4gQBqqR I've started working on this, it will be implemented as part of the upcoming v3.x release

midwan commented 1 year ago

@J4gQBqqR Can you please test with this pre-release version, and see if everything seems OK for you? mb_Subsonic_v3.0_RC.zip

A few notes:

J4gQBqqR commented 1 year ago

I've tried it and configured multiple profiles, I hit ping server button and the server responses normally for all my configs. However, my main UI window shows only one subfolder and it does not update to the selected server after I switch it in my plugin configs: I selected "NewAge", hit apply and save multiple times, but my main UI is still showing "classicals": 图片

Should I expect multiple subfolders shown under the main UI or the "only one" subfolder switched/updated to the server that I selected in the plugin configurations?

midwan commented 1 year ago

Have you tried selecting the Subsonic root level entry, and pressing F5 to refresh?

J4gQBqqR commented 1 year ago

Yes, no luck though. The subfolder list does not refresh. I reboot Musicbee and it defaults to the Default profile. Now I cannot change profile anymore.

midwan commented 1 year ago

@J4gQBqqR I can recreate the issue with changing profiles, seems like I missed something. Thanks for testing!

midwan commented 1 year ago

@J4gQBqqR Could you please test with the updated version below? This one seems to be working properly for me :) mb_Subsonic_v3.0_RC2.zip

J4gQBqqR commented 1 year ago

Great, it works when I switch the profile in the configuration dialog and press F5 in the main GUI! Thanks for the awesome work.

It would be even nicer if all configs can show up as subfolders under the "Subsonic" main GUI entry. But I understand this would be a lot more code change. Current state is still very usable.

midwan commented 1 year ago

@J4gQBqqR Thanks for testing! Yes, I can agree it could be improved further, but it's good to have a first version that has the basics working at least. One step at a time...