davidrickard.net

Random stuff, randomly updated.

Counting, 1, 2, 3

Being so inclined to care about such trivialities as the number of times I’ve played a certain song, I recently had cause to reset the play counts on a few songs. The reason was that I had replaced some tracks in iTunes with higher-quality re-rips, and in doing so iTunes flattened the number of times I’d played those tracks. I use the play counts in a couple of playlists, so I find them useful. Plus I’m a bit of a stats geek, so there we go.

I looked for methods to reset the play counts, but couldn’t find anything. Within iTunes it’s possible to edit pretty much every aspect of a track, except for how many times you played it, and when that last as.

I dug around and found one method which involved hacking about with iTunes library file, which is a gargantuan XML file. I had a go at substituting the play count from one song to another, to see if it’d work, but iTunes decided it would rather helpfully remove it. A bit more digging and I found some Applescript scripts to do it, but they are of little use to me, being on Windows.

Then I found this site:

Windows iTunes Scripts Downloads- liquid parallax’s Blog.

A script to set the play count! I tried it, and it worked. What’s more, it stays after you close and re-open iTunes, and it increments quite happily.

It does raise the fact that iTunes obviously has some sort of API for manipulating it from Javascript (and other things no doubt). I’ll probably look into that more and see what can be done. Still, my play counts are back where they were, so I’m happy for now!

One Response to “Counting, 1, 2, 3”

  • A man after my own heart… stats are wonderful. What is your most played song?