Apple Music library cleanup time

I’ve been working in the background on a long-overdue project: cleaning up my Apple Music library on my Mac. As longtime readers know, I have a lot of digital music, having not only ripped my original 1000+ CD collection but also quite a few records, and have been a major purchaser of downloadable music as well. That means a lot of tracks—over 70,000, to be precise. And more than will typically fit on the internal drive on a Mac, so I’ve been hosting them on an external drive for years. And that works well … except when it doesn’t.

Problem number 1: Let’s there is a power outage and the Mac unexpectedly shuts down. When the power comes back up, there’s a race condition where the Mac is back up and running before the external drive is fully mounted. That wouldn’t be a problem, except that Music (and iTunes before it) automatically reopens after a crash, so it thinks the volume where all the music is has disappeared. And that wouldn’t be a problem, except that if you then go on to work in Music instead of shutting it down and reopening it, it gets confused about where the music is and somehow ends up creating duplicate entries of some songs in the library—one entry for the local file when the drive comes back on line, one entry for the entry in the remote library.

It gets worse. It’s possible to do this multiple times. I have had to clean up cases where there were three copies of each song on a given album.

And the cleanup is manual. I typically have had to go album by album in the Songs view; sort by Cloud Status (“Matched”/“Uploaded”/“Duplicate”/“Removed”/“Waiting”), remove the songs I didn’t want to keep, and then do cleanup on the rest. How that happened depends on what the situation was:

  • Lossless rip marked as “Removed” or “Duplicate,” low-res copy marked as “Matched” or “Uploaded.” This happens a lot. The answer turns out to be pretty simple: select all the low-res versions, right click and choose Remove Download, then select all the lossless copies, right click and choose Add to Library. And wait. Sometimes, depending on the fates, the tracks stay in “Waiting” status indefinitely. Fortunately you can choose “File” > “Library” > “Update Cloud Library” and force it to re-evaluate its life choices.
  • Low-res copy marked as “Removed” or “Duplicate.” This is an easier fix. Just delete the low-res copies.

Of course, you have to repeat this album by album. Did I mention I have over 7,500 albums? Breaking it up by genre helped my sanity.

The very worst is when the library itself gets hosed. I got in a situation a few weeks ago where I was seeing tracks marked as Duplicate but there was no duplicate in the library. I finally realized that somehow, the last time I had reconnected the Cloud Library to my computer, it had not completely downloaded all the available tracks. I crossed my fingers, turned off Cloud Library, rebooted, and turned it back on, and all the missing tracks appeared.

This last opportunity turns out to be an excellent restorative, for both the library and your heart, and I don’t recommend it if you’re out of shape. But I finally am at a point where all the tracks are de-duplicated and only a few (which are probably legitimately corrupted) show up as in an error state.

Progress! Now, I have to fix the duplicated playlists…

Apple Music annoyances, again

Another round of bugs with Apple Music in MacOS Catalina. These were more subtle issues that cropped up in the months after I first took the plunge and updated my library. Well, actually, just one issue, but it’s a big one:

Playcounts get forgotten: This one is driving me nuts. Apple Music does a great job of tracking play counts like it’s supposed to… until you quit and restart it. Then play counts go back to zero. Someone on the Apple Discussions thinks it’s restricted to tracks that came from a source other than the Apple Music service, which is pretty much every track in my library thanks to Bandcamp, HDTracks, and my CD and vinyl ripping projects.

Some of the other bugs have been straightened out as I’ve cleaned up my library and Apple has released new updates. I hope this one gets cleaned up because it’s maddening.

Apple Music follow up – iPhone tips

Following last week’s post about plunging into Apple Music, I have to temper my initial mild exuberance with some reality checks about things that didn’t work so well, and how I got past them. The issues are almost all related to my iPhone, but there was also some playlist weirdness that I had to work through.

Learning number 1: You can’t copy music to your iPhone via sync when you choose to sync your whole library via iCloud. This seems kind of obvious when you write it out that way, but this was a major problem because lots of playlists were just not showing up for me when I flipped my phone to do a library sync with iCloud. These included my smart playlists that I listen to almost all the time (and which I’ll have to write up sometime soon).

Learning number 2: The new Finder-based iPhone sync doesn’t pick up newly created playlists until the Mac Music app is quit. I thought I was losing my mind, because in an effort to fix the missing playlists problem, I created new copies of the playlists with the same rules but different names. And none of them were showing up in the Finder iPhone Sync window. After I quit Music, the new playlists appeared, as did other changes that I made.

This reminds me of something I remembered about third party apps that read the iTunes library file a long time ago — certain changes had to wait for the app to quit because it would keep the file locked until then. Or maybe it was that there was an XML shadow copy of the library that was only updated on Quit? Anyway, I now could at least see the playlist.

Learning number 3: Sometimes you just have to burn it to the ground and start over. Even after I saw the playlist in the Finder, clicked the checkbox, and synced my iPhone, I still didn’t see the playlist when I opened the Music app in the iPhone. This morning I just decided to hell with it, turned off all music syncing, then turned it back on and copied the playlist over. Which worked.

I’m kind of glad I did this, because it gave me some evidence for some benefits in syncing in Catalina. I copied over about half my playlists — tens of GB of data — in less than 30 minutes. This gives me confidence that the underlying synchronization should be at least as fast, if not faster, than the iTunes based sync in Mojave and before.

Other observations:

Syncing your library sometimes duplicates playlists. I’m not sure where the issue was here, but I had something like two or three copies of some of my common playlists after turning on library syncing on my iPhone, iPad and work computer. I deleted the extras, crossing my fingers that I wasn’t causing any problems, but am not sure that this didn’t contribute to the issues I saw on my iPhone.

The way playlists show up in the Finder is a mess. The list of playlists is a garbage fire. Possibly related to the observation above, I saw not only playlists but folders duplicated in the Finder list—and the duplicate folders sometimes had different contents. Not only that, but the playlists in a folder weren’t in alphabetical order. This means that finding a playlist to include in a sync is a total mess.

Now that I’ve gotten through all the above, I am starting to wonder if all my initial problems were caused by a goofed-up iPhone Music library, and if turning on library syncing again might result in a fully working setup. I’m inclined to try the experiment, since syncing did solve one persistent problem for me by making regular-resolution copies of songs that were too high-resolution for the iPhone to handle available for mobile play. But I think I’ll wait until after the weekend.

Deeper into Apple Music

If you’ve read this blog for a while, learning that I’m sometimes a late adopter might come as a surprise. (Or not, given that the blog, and I, am now more than nineteen years older than when we started.) But I’ve held off on joining Apple’s various music-in-the-cloud offerings for a long time. Like almost ten years.

In June 2011, Apple introduced iTunes Match, a feature that would match tracks with your library to tracks already in its cloud based services and upload the tracks that had no match, allowing you to take your music library anywhere. Theoretically. In practice, the rumors abounded of mismatched songs, and even accidental data deletion. And then there was the pesky 25,000 song limit. So I basically forgot about it.

For about nine years.

Somewhere along the way, they raised the limit to 100,000 songs. But I had figured out how to live without the feature. Somewhere along the way, we also became Apple Music subscribers, but I really only used it to look up the occasional release and listen to radio stations.

Then The Girl started asking me questions about different kinds of music, and I really wanted to be able to share some South African music from the days of the battle against Apartheid. And I couldn’t. Home sharing no longer works on iPads, and there was no way to get her music on the Chromebook.

So finally, I took a deep breath and turned on iCloud Music Library. And you know, it actually worked. Want proof? Here’s a playlist I made in 1994, which just shows up in the browser when you check a box:

So once that was turned on, I took the other plunge and upgraded to Catalina, and said farewell to iTunes, in favor of the new Music app. It was surprisingly painless, once I realized that the app was very slow in copying album art. I also had to fix the AppleScripts that I use with iTunes, by copying them from ~/Library/iTunes/Scripts to ~/Library/Music/Scripts. And for some reason, though it found all my music on my external drive, it still wanted my library (“media files”) location to be on my hard drive. That was an easy fix (though it’ll probably take all day to update the library with the new relative file locations).

And now I wonder why I took so long! Having access to all the music, being able to share playlists easily… all good things.