This morning when I hopped on my home desktop machine, I was greeted with a nice iTunes error message telling me that my iPod was trying to sync with a library other than the one it was registered with. Huh?? A quick look at iTunes revealed the problem - it was completely blank! No songs, no podcasts, nothing. That's odd, because I have close to 30k songs I've ripped. I had a good idea what was wrong (but not how/why it happened). A quick look in my "My Documents\My Music\iTunes" directory revealed the problem. Both my "iTunes Music Library.xml" and my "iTunes Library.itl" file were only a few bytes each - when each of them should have been close to 50MB.

To make matters worse, I'm obsessed with meta-data. I have all of the album art and ID3 data for every single song - which is OK because the album art is stored in the directory for each album, and most of the meta-data is in the ID3 tags. BUT, because iTunes insists on using ratings outside of the ID3 tag format, all of the rating information I had accumulated (and associated smart playlists) was gone.

To top things off, I hadn't bothered to make a backup of my iTunes Library XML file lately because I'm running low on storage space. No excuse, I know.

Luckily, while I was looking in the iTunes directory, I noticed a sub-directory called "Previous iTunes Libraries". Inside that dicrectory were several copies of my "iTunes Library.itl" file. The most current one was about three months old - probably the last time I upgraded iTunes. Best case scenario I was looking at here was getting my library back, minus about three months worth of meta-data.

Getting iTunes to use the old .itl file was easy:

  1. Close iTuned
  2. Delete the blank/corrupted "iTunes Music Library.xml" and "iTunes Library.itl" files from "My Documents\My Music\iTunes"
  3. Copy the backup "iTunes Library.itl" file from the "Previous iTunes Libraries" directory to "My Documents\My Music\iTunes"
  4. Open iTunes - all of your music and meta-data up to the point of the backup file will be back.
  5. You'll need to add any music that you've gotten since the update. For me, that was easy. I just choose Add Music from Folder from the iTunes menu and chose the root directory where all of my music is stored. In about 10 minutes, iTunes had added all of the missing songs back to my library

There you have it. Relatively easy way to recover a deleted or corrupted iTunes library. Now if only I knew why iTunes decided to wipe it out in the first place.

I was tagged by Ray Camden. So, here's my contribution to the meme:

Total Volume (of my MP3 library): 104 GB

Last CD Bought: "Hot To Dismantle An Atomic Bomb" - U2

Song Playing Right Now: "Don't Stop Believin" - Journey

Five Songs I Listen to a Lot:

  • Boulevard of Broken Dreams - Green Day
  • PDA - Interpol
  • April 29, 1992 - Sublime
  • Pride (In The Name of Love) - U2
  • Killing in the Name Of - Rage Against The Machine
  • The Distance - Cake
  • Jane Says - Jane's Addiction

Five People to Whom I'm Passing the Baton:

I recently ran out of room on my internal 160 GB harddrive, mainly due to my mp3 collection. All told, I have over 100 GB of music, and I buy more all the time. Couple that with video and my digital pictures, and I'm totally out of space. To solve the problem, I decided to add another harddrive. I was hoping to go with NAS, but after looking around, I didn't really find anything that offered a decent enough price/storage ratio. In the end, I added another internal drive. I went with a Seagate 250 MB SATA drive to match the 160 GB drive I already have. I chose Seagate because they are the only company offering a 5 year warranty. Earlier this year, I had two harddrives go within a month of each other. One was 4 years old, and the other 3.

I run Windows XP at home, and store all of my music/pictures/videos in shared folders as both my wife and I have our own iPods. The way I have it all configured, we have our own iTunes XML library files so that we can have our own song ratings, play lists, stats, etc., but make use of the same library of songs from the shared folders. Since I was planning to move all of our media to the new drive, I knew I was going to have to make some changes to both Windows and iTunes to get it all configured correctly.

The first thing to create new folders on the new drive and get Windows to recognize them as my shared folders instead of the default shared folders located in C:\Documents and Settings\All Users\Documents. To do this, you need to make some registry changes. Please note that if you use TweakUI, it claims to be able to change the shared documents location, but it doesn't work. The only way I have found to do this is by directly modifying the registry. For specific instructions, see here. After following the instructions, I had my shared documents folder located at D:\Shared Documents. I put a My Music, My Pictures, and My Videos folder under Shared Documents.

The next step was to copy all 100 GB of my music collection from my C drive to the new location on the D drive. This took about 30 minutes or so to complete. One thing to note here. I don't let iTunes manage my music in terms of letting it take control of my files and folders. I tried this once when I first switched to iTunes and found that it basically sucks. iTunes may think it knows how to best organize your music collection, but it doesn't. I didn't like it's organization of naming conventions at all. I've always let iTunes keep it's library and xml file in my My Documents folder, but my actual music has always resided elsewhere.

You may be asking why I didn't simply blow away my iTunes xml and database files and re-import all of my music. If I did that, I would lose all of the rating information, play lists, etc. that I mentioned earlier. So, in order to get iTunes to recognize my music in the new shared folders location, I needed to tweak the iTunes XML file that points to each song. It took me quite a bit of trial and error to get this right last night. In the end, this is the procedure that worked:

  1. Close iTunes
  2. Before doing anything else, make a backup of your iTunes Music Library.xml and iTunes 4 Music Library.itl files. They are located in C:\Documents and Settings\user\My Documents\My Music\iTunes by default.
  3. Open the iTunes Music Library.xml file in Wordpad and do a search and replace for all occurrences of your current drive/directory location and replace with your new location. Note that directories are separated with a forward slash, and all spaces in directory names must be escaped as %20. Depending on the size of your XML file, this could take a while. Mine is 30 MB. I ran a few errands and found it had completed when I returned. Save the file when you are done.
  4. Now, you need to corrupt your current .itl database file. The easiest way to do this is to open it up in Wordpad and just delete the contents of the entire file, then save it. You should have a zero byte file.
  5. All that's left to do now is to open iTunes and let it rebuild your database. After it scans in all of your mp3's, ut will tell you that the .itl file is corrupt and ask if it's ok to rebuild it. Let it rebuild the database, and when it's all done, you are all set!

My wife has been getting pretty jealous of my iPod lately (4th gen, 40GB ). That jealous look she's shot me more than once while we were traveling somewhere, me with my headphones on oblivious to the fact that she was bored out of her mind, convinced me to get her an iPod for Christmas.

We're big U2 fans, so I decided to fork over the extra $50 and get her the iPod U2 edition. I love the black color, but wasn't too crazy about the red click wheel from the online photos I've seen. I ordered anyway. Needless to say, when she opened it last night (early present), she was thrilled. It's actually pretty sweet looking, red click wheel and all.

For the extra $50, you get the iPod in black (something what would cost you close to that to get custom done. It's also laser engraved with the band's signatures. It also comes with a coupon for $50 off of the U2 virtual box set, available only on iTunes. We probably won't be picking that up, as we already own every U2 Album produced, including a bunch of imports. It's a shame that they aren't selling some of the unreleased songs seperately. I don't want to spend $100 for a couple of songs that weren't good enough to make it on a previous album!

Well, looks like the cat's finally out of the bag on the new iPod Photo. The details are pretty much as reported in other speculatory announcements. I think the $599 price for the 60GB edition is a little steep, though.

All in all, I'm not really too excited about the capability to display photos on my iPod. I mean, who really wants to look at pictures on that tiny screen? It's like showing you pictures on the LCD of my digital camera. Thanks but no thanks.

The ability to display album art is kinda cool, but in the end, that doesn't really get you much either, does it. Especially if you are like me and mainly use your iPod when working out. I rarely see the screen! Looks like all photo synching is going to happen through iTunes and not iPhoto like people had hoped.

In related news, Apple also announced the details of the special U2 Edition of the iPod. $349 gets you the 20 GB model, a poster, and a $50 coupon toward the download of a digital only special box set of U2 songs. As a huge U2 fan, this one is more appealing. I already own a 40GB 4th gen iPod that I just got a few months ago, but the wife's been itching for her own. Hmmmmm.....

If you are looking for a decent java based open source streaming MP3 server, check out Streamsicle. A coworker of mine turned me on to this. It's pretty sweet and has absolutely nothing to do with ColdFusion.




Copyright 1995-2010 Rob Brooks-Bilson. All rights reserved.
Aura skin for Raymond Camden's BlogCFC inspired by Joe Rinehart & Steven Erat. This blog is running version 5.9.004.