API extension for local scan?

Hi,

I was looking for a Local Scan call in the API explorer, but it seems I can’t find. Am I missing something?

I don’t have an API explorer instances running anywhere but I can see the call in the v1.1 documentation.
https://docs.mopidy.com/en/release-1.1/api/core/#mopidy.core.LibraryController.refresh

EDIT: Ignore this, I answered a different question for some reason.

Sorry! I read that entirely wrong. But you can see from the API documentation that we don’t have any way to call “local scan” from the Core API. There’s a long-standing issue for this here which someone who was interested could work on solving.

I will have a look at that link. In the meanwhile, isn’t just a matter of executing a system command from a python script, and call the python script through an AJAX call on the webclient?

Yes, in terms of what PiMusicbox would do. But not in terms of what Mopidy would ideally do,

Yes, I agree. But this could be an update of mopidy-musicbox-webclient

I think I might be tempted to have it in mopidy-websettings. I wouldn’t expect it’s a button that would see much action and cluttering up the UI with that kind of thing is a slippery slope. FYI, this also applies to displaying the version information in musicbox-webclient. I’d probably prefer to have that on a dedicated debug page (along with the version information for everything and log files).

Ok, but usually Home pages of web applications always have the version displayed. Maybe on the bottom of the page…

At the bottom sounds nicer. That’s a lot less intrusive.

Mmmh. At the bottom of the left column, as there is no footer in the webclient.

I agree: the updateDB function should be in websettings, in the “Music files” section. But - as things are currently already mixed - I need to modify controls.js in mopidy-musicbox-webclient and __init__.py in mopidy-websettings. This is how things works now for reboot/shutdown.
(P.S: Why the reboot/shutdown functions are split between webclient and websettings??)

This function can be easily implemented, but the code must be splitted over 2 separate projects, so it is quite uncommon and not standard. I think I’m going to edit my local files and not issue a Pull Request.

I moved the version label at the bottom, see the Pull Request.

29