Is it possible to force a Re-scan or an Update?

Is it possible to use an API or CLI to force a music source re-scan?

I have a portable Volumio which for most of it’s time uses my main Volumio ssd as a network drive for its music source.
For the times when it’s out of WiFi range and unable to mount the drive I was hoping to simply plug in a usb drive of music files, hoping that it would re-scan and replace the library with the new, usb drive files.
Unfortunately it adds the new files to the existing ones and I would like to perhaps set up a button on the remote to force a re-scan (or is it an update- never sure!)

Have you tried using the Volumio UI to force a re-scan? In Settings => Sources there’s the following section:

Many thanks - but I’m trying to do the job without having a UI to look at.

Unfortunately the version of MPC in Volumio doesn’t have the rescan command (only update).

If you’re happy to script your own solution you could try sending a web socket event directly using

node /volumio/wsclient.js rescanDb "Sent from CLI"

Note that this script won’t exit on its own, so you’ll need to interrupt it.

Many thanks. I was expecting it to be a Volumio command rather than mpd.

You live and learn!