Importing macOS iTunes app or Music app Playlists from a NAS Volume

  • 27 November 2021
  • 2 replies
  • 53 views

Like many in the Sonos community, I struggled with the right recipe to get playlists from a former macOS iTunes app library that had been migrated to the Music app library on a macOS upgrade to Catalina to import and be recognized by Sonos players from a remote network-attached storage (NAS) volume, such as QNAP or Synology.

After experimentation, I believe I have developed a script that handles both iTunes app (prior to Catalina) and Music app (Catalina and later) that successfully allows the Sonos players (or at least Play:5 (Gen 2)) to import and play tracks from media and playlists on NAS volumes exported by those macOS apps.

It is available at:

https://github.com/gerickson/nas-sonos-itunes-sync

This script can either be run manually, one-demand from the command line or automatically, on a schedule as a LaunchAgent (see included example in the project).

I have also been apprised of an app on the App Store that will do something similar, but with a nice UI/UX:

https://apps.apple.com/us/app/music-library-exporter/id1553648567


This topic has been closed for further comments. You can use the search bar to find a similar topic, or create a new one by clicking Create Topic at the top of the page.

2 replies

hi @gerickson I found the ‘Export for iTunes‘ tool. This macOS Catalina (and above) compatible programme is able to read the Music app playlists. It copies all files to a NAS (like Synology) and exports the playlists to .m3u format playlists. The ‘Export for iTunes‘ tool has many features to rename and convert your music files and allows you to copy the files in a new folder structure by artist, by album etc.

 

@el rubio, thanks for the comment, tip, and link!

For interactive usage, Export for iTunes looks like a nice program that expands on the capabilities found under the Music app File > Library > ... menu. The downside, however, of interactive solutions, particularly for Smart Playlists and users who actively purchase songs or create / change playlists, is remembering to manually run such solutions when changes occur.

With NAS Sonos iTunes Sync or Music Library Exporter, when used automatically on a schedule in the background, users need not remember to run the tool. The synchronization happens automatically at the desired time or times whether Music app or iTunes app is being used or not.

Finally, an additional benefit of exporting playlists in the ‘iTunes Library.xml’ format is that you do not end up with “<Playlist>.m3u” playlist names in the Sonos player, just “<Playlist>”—a minor but aesthetic consideration.