Macworld

Ask the iTunes Guy

Kirk McElhearn answers your iTunes questions

-

S ome of the questions I get about iTunes issues are relatively easy to solve, but others require a lot of time and exploratio­n. In this month’s column, I look at a single question about an iTunes library that seems to have gone back in time. There are important lessons to learn from a problem like this.

Plus, do you find it annoying that when you get in your car, start it up, and music starts playing from your

iPhone? It’s not the iPhone’s fault. Some songs in your iTunes library are louder than others. It’s not iTunes’ fault. And if you download public domain audiobooks and want to move them to iTunes’ Audiobooks library, well that’s easily done.

MY iTUNES LIBRARY HAS GONE CRAZY

Q I launched iTunes recently, and the app displayed a dialog saying that it was ‘Importing iTunes Library.xml’. When this finished, I noticed a number of anomalies with my library. Some music I had ripped recently was no longer there, and some podcasts I had listened to and removed a long time ago were now showing up. I found old playlists that I had deleted long ago, and my newest playlists were missing. What’s going on? A The above is an abbreviate­d summary of a very long email a reader sent me, which led to a fair amount of correspond­ence over a few days until we figured out his problem. It’s an interestin­g issue, and one that I’m going to present in depth to discuss some precaution­s you can take to ensure the integrity of your iTunes library.

What intrigued me was the fact that iTunes rebuilt the user’s library, which suggested that the iTunes Library.itl file might be corrupted. But the ‘new’ library turned out to be quite old. It was in fact nearly two years old, which gave a clue as to what happened.

When iTunes 12.2 was released in late June 2015, it added a new preference which changed the way the app stored some of its library files. This new

option, in the Advanced pane of iTunes’ preference­s, allows you to share the iTunes Library XML file with other applicatio­ns.

iTunes previously had created two main library files:

iTunes Library.itl iTunes Library.xml

The former is the file that contains informatio­n about your library: the tracks and other items it contains, their play counts and ratings, and your playlists. The XML file was created so other applicatio­ns (including Apple’s own apps) could read that library to access your

media files. But with iTunes 12.2, Apple turned off the automatic creation of this file, since its apps (iMovie, for example) could now read the iTunes Library.itl file to import music into projects.

This XML file was useful for more than just Apple and third-party apps; you could use it to rebuild your iTunes library in case of problems. This technique has saved my iTunes library at times, and it’s one I recommend to people having inexplicab­le problems with their iTunes libraries.

In the case of my correspond­ent, the iTunes Library. itl file was corrupt, and iTunes did the logical thing, importing the iTunes Library.xml file that it found to create a new library. However, since iTunes no longer creates or updates the XML file, it was out of date; by nearly two years. The file iTunes loaded was the last one created before Apple introduced the setting to create the XML file. In other words, when Apple changed this behaviour – having iTunes create the XML file only when users specifical­ly told it to – it froze that file in time.

iTunes updates the iTunes library.xml file whenever it makes any changes to its main library file. The XML file can be seen as a sort of backup of the iTunes Library. itl file, even though that’s not what it’s meant for. If my correspond­ent had checked that option in the iTunes preference­s, then his library would have been rebuilt using a recent XML file.

My correspond­ent had a Previous Libraries folder in his iTunes folder, and was able to load a more recent library. But if he had backed up these files regularly, it would have been a lot easier. macOS includes Time Machine, an automatic backup system that

automatica­lly stores copies of your files to an external or network drive. To protect your iTunes library and your other files, it’s a good idea to use Time Machine. This is better than just copying your files or cloning your drive, since it stores multiple versions of your files. If the iTunes Library file in your backup is corrupt, then you’re out of luck, but with Time Machine, you can go back in time and choose different versions until you find one that works.

I also strongly recommend checking the option mentioned above to have iTunes create that XML file. It doesn’t cost you anything, and it can save your iTunes library if something goes wrong.

So make these two changes to ensure the integrity of your iTunes library.

AUTO-PLAY IN CARS

Q As soon as I start my car, the first song on my iPhone starts playing. I know a lot of people have this problem, so how can I fix this? A I happen to have recently bought a car with Bluetooth for the first time. I noticed that the same thing was happening; whenever I got in the car and started it, music would start playing. It’s not the first song, however, it’s whatever was playing last time I used the Music app, or another app that plays audio (such as a podcast app).

I checked with the car manufactur­er, and a spokespers­on explained that this was a feature, not a bug, and that I needed to turn off audio in the car each time I exit it to prevent it from playing music the next

 ??  ?? This options tells iTunes to create an XML file from its library file
This options tells iTunes to create an XML file from its library file
 ??  ??

Newspapers in English

Newspapers from Australia