Ask the iTunes Guy: Rebuilding an iTunes library, dealing with duplicate playlists

Fixing two problems with iTunes 12.

The iTunes Guy

Today's Best Tech Deals

Picked by Macworld's Editors

Top Deals On Great Products

Picked by Techconnect's Editors

One reason I enjoy writing this column is because I get to hear from iTunes users around the world, understand how they use iTunes, and help them enjoy their music more efficiently. But recently, I’ve been getting more and more emails about things that are just broken. This week, I answer two questions related to changes wrought by iTunes 12: the first about a missing XML file, and the second about libraries getting mangled by iCloud Music Library.

Where’s the XML file?

Q: I had a problem with my iTunes library, and wanted to rebuild it. All the instructions I’ve seen tell me to use the iTunes Library.xml file to do this, but I don’t have this file. How can I rebuild my library?

As you say, the standard way to rebuild an iTunes library has always been to load the iTunes Library.xml file, and iTunes would rebuild its database, which is stored in the iTunes Library.itl file. I explain how to do this in this article. However, since iTunes 12.2, the XML file is no longer created by default.

This XML file was essentially designed so third-party apps could access your iTunes library. For example, if you create a project in iMovie, and wanted to add a soundtrack, iMovie’s media viewer would scan that file to allow you to choose the music you wanted to use. In addition, a number of AppleScripts that perform useful actions on your iTunes library, and its contents, require access to the file, since they cannot read the .itl file. (Doug Adams explains this in a FAQ on his website, Doug’s AppleScripts for iTunes.)

Apple changed the way apps like iMovie and others access media; they now read the iTunes Library.itl file. So the XML file is only needed by third-party apps. As such, there is now a setting in iTunes’ Advanced preferences to Share iTunes Library XML with other applications.

advanced prefs

Check this setting to tell iTunes to create the iTunes Library.xml file.

While Apple may have changed this for security reasons, the fact that the XML file is no longer written by default means that you don’t have a crucial file that can help you recover from a corrupted iTunes library. (I’ve had to do this several times over the years.)

I strongly recommend checking the above option, so you always have the XML file in case you need to recover your library, and, ideally, have backups of it as well. There’s no real downside to this; while iTunes writes the file every time you make changes to your library, if your Mac is recent, you shouldn’t notice this at all. (You might see a bit of lag with a very large library on a slow Mac.) But having this spare tire can save you from losing your library, your playlists, and a lot of your metadata.

Why all these duplicate playlists?

Q: I have been using iTunes for a long time, and I recently subscribed to both iTunes Match and Apple Music. They seem to hate each other. I have had whole albums vanish and reappear as “recently added” only to find as many as three copies of every song on the album in the actual music folder.

I have learned how to manually delete and restore them, but it is frightfully tedious with 45GB of music. I realize the answer is probably to do away with everything but Apple Music, because you can listen to almost anything you want. But I have a lot of really obscure stuff that has taken years to accumulate. Is there any way to fix this?

I’ve received a number of emails like this in recent weeks, all lamenting the fact that people’s iTunes libraries, and their iOS devices, have become as hard to navigate as a bayou in the night.

I share the pain of the many people who have written about these problems. I won’t use iCloud Music Library on my main iTunes library; I only have it activated on my MacBook, which has a much smaller library. iCloud Music Library is a disaster. It duplicates tracks, alters metadata (such as changing song ratings to album ratings), changes artwork, and more. I wrote about this back in July, when iCloud Music Library was first introduced, and I haven’t seen much evidence to suggest that it’s any more trustworthy now.

There’s not much to do other than keep deleting, and let Apple know about it, especially if you recently bought something from Apple and still have telephone support, or if you have AppleCare on one of your computers or iOS devices.

The promise of Apple Music and iCloud Music Library was the ability to combine music you own with music you rent. Alas, this has been so poorly implemented that listening to music, with iCloud Music Library turned on, has become drudgery. And instead of helping users find creative ways to listen to their music in iTunes or on iOS devices, I have to lament how much is broken.

So this is what I do. My main library, on my iMac, syncs to my iPhone, both of these have iCloud Music Library and Apple Music turned off. A smaller library, on my MacBook, uses iCloud Music Library, as does my iPod touch, so I can add to it songs and albums from Apple Music. I can listen to music from my large library or from Apple Music at home, but I won’t allow my large library, which represents years of collecting, ripping, tagging, and listening, be damaged by iCloud Music Library. That’s the price to pay for new features that seem to be designed not by iTunes engineers, but by Apple’s marketing department.

Have questions of your own for the iTunes Guy? Send them along for his consideration.

Note: When you purchase something after clicking links in our articles, we may earn a small commission. Read our affiliate link policy for more details.
Shop Tech Products at Amazon