Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

darkpaw

macrumors 6502a
Original poster
Something happened recently to the playlists in the Apple Music app on my Mac. It duplicated all the playlist folders and their playlists inside. (I didn't do anything; it had happened overnight.) The duplicates appeared on my other devices.

I didn't want to delete the duplicate folders as I figured some nonsense code in Apple Music somewhere would think "Oh, he wants to delete the folder called 'ABC', but there are two of them; I'll just be helpful and delete both!" meaning I'd lose all my playlists. So, I renamed one of each folder, made sure they synced to the iPhone, then deleted the renamed ones.

This seemed to work... until the next night when the Music app decided I did really want to delete all those folders anyway, so it did. I restored from my Time Machine backup and everything was fine, but because it syncs to the cloud it merely deleted all the folders I'd previously deleted anyway! I ended up with zero playlists.

So, I turned off Wi-Fi, put the backup library file back, saw the playlist folders and playlists in the app, then exported the library as XML, and checked the file was correct.

I then deleted everything in the library, turned on Wi-Fi, and let it sync across the devices. All good.

Then I imported the playlists from the XML file. The playlist folders and playlists all showed up in the Music app, but they will not sync to other devices.

If I create a new playlist it syncs, so I figured I'd create a new playlist folder 'ABC2' and move the playlists into that, then delete 'ABC'. 'ABC2' syncs to the other devices, but the playlists don't. Only new playlists and playlist folders will sync. I can create a brand new playlist and put it in 'ABC2' and it will sync. It's like it's almost pointless in being able to import playlists into the Music app if they won't ever sync.

So, rather than create a new playlist for every single playlist I already have - which will take months - how do I get my library back? It's been curated since the first version of iTunes, and I'll be damned if I'm going to lose this because Apple's software is so shabby.
 
I've fixed it - after three weeks. (It happened before I went away for a two-week holiday, and couldn't listen to any of my playlists while abroad...)

I deleted everything again, signed out of Apple Music, quit the Music app, then launched it again and signed in. I then imported the backup XML file (with 1.6 million lines), and waited.

All my playlists were imported correctly but the folder structure was completely banjaxed. No folders had any playlists in, and the structure was only one folder deep, so there were no nested folders anymore. I've had to manually rearrange it, which has taken all day.

If anyone reads this after experiencing the same issue, and has a backup of their library XML (not everyone will have this):
- Sign out of Apple Music on the Mac.
- Quit the Music app.
- Hold down the Option key and launch the Music app.
- Choose to create a fresh library file.
- Sign into Apple Music.
- Import the XML file via the File menu > Library > Import Playlist... option.
- Wait.
- Rearrange as required.
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.