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…

Putting the S in Christmas

If you visit this blog from time to time, there’s something new you may not have noticed up in the address bar: a padlock. Since starting my site, it’s been available over HTTP only, but as of this weekend, if you try to connect via HTTP, it’ll quietly redirect you to HTTPS.

I work at a security company, and ironically that’s what may have delayed my installation of a security certificate on this site. The risk here is low, given that I’m the only one that logs in. However, it always bugged me that I hadn’t added transport level security (TLS) to the site, and this weekend I logged into my hosting provider’s console to see what I needed to do to fix it.

It turned out to be ridiculously easy. My hosting provider, Pagely, has a direct integration with LetsEncrypt, a nonprofit – and free – certificate authority that generated a new secure certificate for my site with just a few clicks. After that, the door was closed.

It feels a little sad to take this step, like moving out of a neighborhood where you don’t need to lock your doors. But it certainly couldn’t be easier.