I have a web app that uses the MusicKitJS together with Apple Music's API to display information about music releases. The behaviour since MacOS Catalina has changed due to the introduction of the Music app and removal of iTunes. Links like this one, that did open the album in iTunes, don't open in the Music App:
https://music.apple.com/us/album/incredible-vice-ep/1491161925
I've done some digging on the above URL's page source, and noticed that if the https://
is replaced with itmss://
, then the album does open in the Music app:
itmss://music.apple.com/us/album/incredible-vice-ep/1491161925
However, the behaviour seems to be broken:
If the Music app is already open on the machine, then the clicking the above link from a browser will put the focus on the Music app, and then properly redirect to the relevant album.
If the Music app isn't already open, then clicking the above link from a browser will launch the Music app, but it doesn't redirect to the relevant album.
Is there a way to both open the Music app if it isn't already open, and open the relevant album inside the app?