Thursday, March 13, 2008

Transferring Play Count info on iTunes

iTunes logo
I'm really, but really anal when it comes to my Play Count statistics ( link 1, link 2 & link 3), I like those to be consistent and real, even across boxes; so I have looked all around for a program, script, trick or something that would allow me to transfer the data back and forth between Thor and Trantor.

But it seems like there is none, I did found this link, tho:

How to Sync your iPod with one computer, but Listen to it through iTunes on multiple computers

But the solution involves using the iPod as the method to store the Play Count info when plugged to a different box. I don't want that, I prefer to store the data on the box, and simply move that from box to box.

So I have being using this method to transfer all the music (by far, the easiest part) as well as the Play Count, ratings, etc, from the iTunes on Thor to Trantor.

So, close your iTunes if running, and the important files, the one that store the info, are 'iTunes Library' & 'iTunes Music Library.xml', it will be wise to make a backup of the original ones, before starting to edit those. They are located on the '~/Music/iTunes/' directory on a plain vanilla Os X/ iTunes install.
You'll have to do two things to the files, wipe the contents of 'iTunes Library' (totally blank it), and then replace the file 'iTunes Music Library.xml' with the one you are transferring from the other box.

So, on the box you want to transfer the Play Count data, open Terminal, and cd' to the above directory, then type:

cat /dev/null > 'iTunes Library'

Then, you'll replace the file 'iTunes Music Library.xml' from this box with the one from the other box, with the update Play Count statistics, etc.
If, for instance, the iTunes libraries are located on different places on the different boxes, you'll have to edit the path on the file 'iTunes Music Library.xml' now.

For instance, on Thor, my Quicksilver, the path is:


While on Trantor, the PB laptop, the path is:


I use Emacs, with the Meta + X + replace-regexp function to replace the old path with the new one, trying to edit the file with TextEdit simply chokes the program, it is probably too big to handle.

After the files are blanked, replaced and edited (if needed), start iTunes and wait till it regenerates the whole Music Library again.

Labels: , , ,


Post a Comment

<< Home