« Today's Weather Report | Main | Baby it's cold outside... »

I Would Walk 4000 Songs...

Well, last night I sat down and started rebuilding my iTunes library. Just finished a few minutes ago. (Yes, I did sleep during that time, too!)

Why did I need to do this, you might ask?

Well, I turned off my automatic sync about 6 months ago now, so that I could listen to my library on more than one computer off the iPod. By putting it in manual mode, I can plug in my iPod into my laptop while I’m at work and iTunes will let me read it, play songs from it, edit the tags, etc. I didn’t realize at the time I’d end up losing the ability to select a sorting method for my “Smart” playlists along with a few other features I had come to expect when I was using the automatic sync.

Around the same time, I tried out the ml_iPod plugin to WinAmp. iTunes seemed a bit overkill if all I was interested in was playing songs during the workday.

The problem was, ml_iPod not only destroyed my “Smart” playlists I created in iTunes and changed them into normal playlists (thus removing the dynamicism from the playlists, much to my dismay) but it also corrupted the “Date Added” field for almost all of the tracks on my iPod. Everything’s “Date Added” field was set to 7/20/1978!

Since I was using manual sync, I didn’t have an iTunes library that retained all that data in order to restore either the “Smart” playlists or the “Date Added” field. I begrudgingly recreated the playlists, but since there is no way to edit the “Date Added” field in iTunes, many of them didn’t work anymore.

I started doing some research and got a hold of the Windows iTunes SDK. I found I could do all kinds of things programmatically (yay!) but it still didn’t expose an interface to the “Date Added” field.

After a bit of thinking, I tested out iPodRip. It would do most of the heavy lifting (restoring the tracks back to an empty iTunes library from my iPod, copy over the ratings, playcount, other metadata) but I was still stuck with this “Date Added” field issue. I finally came up with the solution. I commandeered my “guest” PC here at home and started playing with the clock. Indeed, iTunes read from the system clock each time you added a track, either through the normal interface or through iPodRip.

Now, having a solution in hand, I did the data collection I needed to do. I had a few old iTunes Library.XML files that I could load up and extract the “Date Added” field for each track prior to the ml_iPod incident. I also had about 2-3 months of “Date Added” data on my iPod itself (it hasn’t touched anything but iTunes since the corruption). After running all this data into Excel, I could sort all the tracks by “Date Added” and perform a bunch of iPodRip imports.

Change the system date, select the tracks in iPodRip, import, repeat. Luckily many of the tracks were combined in albums (since I ripped them that way) which saved a lot of time, since I could select 10-15 songs at a time and import them all at once.

I had “Date Added” data for about 3700 of my 6500 songs. Now I’ll set the system clock to some weird value (I’m thinking 1/2/03) and import the remainder, which will then complete the rebuild of the library. After this, I can revert to the automatic sync method.

Seems like a lot of work…too bad Apple doesn’t make it easier to change the “Date Added” date. Also, the ability to backup the iPod database in manual sync mode would be nice. Above all, it would be nice if ml_iPod respected the sanctity of the database on the iPod so that it wouldn’t corrupt it unless you told it to do so through some option.


This page contains a single entry from the blog posted on December 18, 2004 12:48 PM in Music and Play.

The previous post in this blog was Today's Weather Report.

The next post in this blog is Baby it's cold outside....

Many more can be found on the main index page or by looking through the archives.

Creative Commons License
This weblog is licensed under a Creative Commons License.
Powered by
Movable Type 3.34