Blog's from the Bush
The ramblings of a lost technocrat...

Rebuilding your iTunes 8 Library

| 2 Comments | No TrackBacks | Bookmark and Share

Like many people I've been building my iTunes collection over many years, in fact since before iTunes was born, back in the good old days of Sound Jam and other venerable MP3 players.

Also like most of you I've come to realise that to a certain degree the range of meta-data that has accumulated in my iTunes library is worth a lot of my time - so it comes as a nasty shock when you first realise you may have lost all of that wonderful meta-data.

Already I can hear you saying why didn't you have a back - well I do (and in the end it worked). In my case the problem was a corrupt library file, no problem thought I there's a simple way to rebuild this information (see this Apple TechNote). Note that amongst other things this TechNote refers to an old name for the XML backup iTunes keeps of your music library database - it's now called iTunes Library.xml not as stated "iTunes Music Library.xml"

Apart from the fact that iTunes keeps a nice XML copy of your library's database for you - I also have daily copies that I can recover from - so I'm good right?

So, being smug, I fired up iTunes told it to create a new library and following Step 7 from the TechNote I selected File-> Import, except for one small thing - iTunes 8 doesn't have an Import option under the File menu!

A quick hunt around came up with an oddly named "Import Playlist" option in a sub-menu of the File menu:

iTunes Library Submenu

Along with a few other options which I'll look at in another post. Now this at first glance doesn't seem very helpful and according to the iTunes 8 Help not what I was looking for:

You can export a playlist and import it on a different computer so that you can have the same playlist in both places. You can also export a playlist to save a copy of it. Exported playlists contain a list of the items in the playlist; the actual songs or videos aren't included.

Looking around with iTunes 8 about 24 hours old I didn't have much luck, so, having nothing to loose I pointed the "Import Playlist…" at the "iTunes Library.xml" and nothing happened... well nothing good I ended up with about 200 invalid Smart Playlist's. Hmmm... back to scratch.

At this point I thought maybe the XML file was corrupt so I stepped back to an earlier version, and.... got basically the same result.

Next I decided to investigate the XML file using Apple's Property List Editor (included with XCode which can be found on your OS X install disks), normally double clicking the file would open Property List Editor (PLE) on my computer however it launched Microsoft's Open XML Converter instead. This lead me to notice that the file was actually showing a generic text icon in the Finder - I dragged it onto PLE and saved it without making any changes. Now I was back to the more familiar blank icon. Then, back to iTunes 8 and this time it worked.

Don't ask me what it did all I know is that it worked (I suspect PLE either fixed some malformed XML or simply wrote the file out in a valid format that iTunes 8 now uses). If this helps you at all my work is done!

No TrackBacks

TrackBack URL: http://www.lensenergy.com/cgi-bin/mt/mt-tb.cgi/92

2 Comments

Wow! Worked like a charm! My problem was similar, I wanted to move parts of my music files placed on an external drive back to my build-in drive. iTunes didn't keep track when I moved them manually, so I had to load the XML library file into TextMate and do a find/replace to correct all file references. Only after saving the library using the Property List Editor I could import it as a playlist into an empty iTunes library.

I was lucky enough to find software called itunes rating saver which worked when nothing else did. Contact the creator at sam.wood@gmail.com. Good luck!

About the Author

 I've been described as a lost technocrat or a wondering luddite, personally I just like everything that takes us forward.


As the principal of CPPL I try to deliver OSS web solutions to our clients and Cocoa platform software for end-users and businesses alike. Oh, and we enjoy writing IOS software for the iPhone & iPad.

Pages

Powered by Movable Type 4.33-en

About this Entry

This page contains a single entry by craig published on September 22, 2008 10:43 PM.

Find recent content on the main index or look in the archives to find all content.