How to scan music for all users at once on a central External Storage?

I generally use this command on my mac to update the Music database for all the users in my NextCloud installation.

sudo -u vish php occ music:scan --all

I have about 4000 mp3s on my External Storage and all my 5 users use only this External Storage. So what this command does is scan the files on the External Storage individually for each user in the Nextcloud. Since all the users use the same External Storage, isn’t there a way to scan for all 5 users at the same time and index all the files on the External Storage for all the users at once ?

Sorry, this is not possible due to the database design of the Music app. Basically, there needs to be a separate database entry for each music track seen by a user. If the same track is seen by multiple users, there will be as many database entries as there are users seeing it.

To keep things nice and simple, the Music app scans music libraries one user at a time. For each user, the app takes the configured music library folder, and scans all the audio files under that folder. The app doesn’t care if those files are user’s own files or shared by the user or located on an external storage.

Now, of course the Music app could be modified to use some other logic for scanning and even the database schema could be changed. But this would be a considerable amount of work and could easily increase the overall complexity of the app. Added complexity means more bugs and any work effort used on this would be away from effort used on other bug fixes and new features. Hence, I don’t believe this would happen at least in the foreseeable future.