MB_SubSonic icon indicating copy to clipboard operation
MB_SubSonic copied to clipboard

Multi-server support

Open J4gQBqqR opened this issue 3 years ago • 2 comments
trafficstars

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

J4gQBqqR avatar Sep 28 '22 20:09 J4gQBqqR

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.

midwan avatar Oct 03 '22 09:10 midwan

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.

J4gQBqqR avatar Oct 12 '22 11:10 J4gQBqqR

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

midwan avatar Nov 06 '22 11:11 midwan

@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:

  • The settings file format has changed, as we have to support multiple servers now. Your previous config will be migrated on startup (if you agree to the related prompt), and then deleted. You may want to keep a backup of it first, just in case you want to roll back.
  • The current profile can be changed/selected by going in the Plugin settings window.
  • There is a "Default" profile that's always there, cannot be deleted or renamed. That's on purpose for now.
  • You can create new profiles, and rename or delete them as you wish beyond that

midwan avatar Nov 06 '22 15:11 midwan

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?

J4gQBqqR avatar Nov 07 '22 14:11 J4gQBqqR

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

midwan avatar Nov 07 '22 14:11 midwan

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.

J4gQBqqR avatar Nov 07 '22 14:11 J4gQBqqR

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

midwan avatar Nov 07 '22 17:11 midwan

@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

midwan avatar Nov 07 '22 17:11 midwan

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.

J4gQBqqR avatar Nov 07 '22 20:11 J4gQBqqR

@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...

midwan avatar Nov 07 '22 20:11 midwan