Is com.apple.AMPLibrayAgent not used by Apple Music.app?

I ran into a problem with Catalina (and later) and the new Muisc.app while using the ITLibrary framework.

The ITLibrary.mediaFolderLocation and ITLibrary.musicFolderLocation methods no longer return the correct values. In fact, the fields in UserDefaults have not been updated on my system since moving from iTunes to Music because the library pointed to by “iTunes-media-folder-url“ points to an old iTunes library within the com.apple.AMPLibraryAgent suiteName.

After doing some digging and performing a dump of all UserDefaults and comparing them before and after manually switching my Music Library by option+Clicking the Music.app icon, there are no changes between the two dumps with respect to the Music.app. This leads me to believe the Music.app is not storing it's information in UserDefaults like iTunes used to.

Has anyone else run into this problem? Is there somewhere else one can look into the system to find what the last selected Music library was? I'm looking for a reliable workaround to know the location of the currently selected Music library.

com.apple.Music.plist

library-url = file:///Users/username/Music/Music/Music%20Library.musiclibrary/

Is com.apple.AMPLibrayAgent not used by Apple Music.app?
 
 
Q