The script can be run from Terminal, anyway I’ll add detailed instructions to wrap it in an application using Automator.
If anyone has any question, get in touch!
A quick update for anyone using this script: it does not work with macOS 26 Tahoe. It seems Music.app’s fault. Probably/Hopefully it will be fixed in the next releases.
One problem remains: all the tracks streamed from Apple Music have track number set to 0, so the MBID guess could be wrong. Didn’t happen in a few tests I made.