Issue: I have too many songs in my iTunes library.
Solution: Delete songs from the library!
I want to get rid of songs that I don’t like, and, at this point, even just songs I’m a bit ambivalent about.
Because I have several thousand songs I’ve listened to less than twice, I have a Smart Playlist set up that selects songs with a Play Count less than 2. I’ll listen as iTunes randomly shuffles through the playlist (technically, Party Shuffles through, giving me history and clairvoyance), and when I hear a song I don’t like… I run in to an issue. See, iTunes doesn’t let you remove songs in a Smart Playlist from your main library. No, you can remove ‘em from whatever playlist, but not from the main library.
So there’s a workaround: Instead of deleting them, I can append “delete” to the Comment field of the song, and every week or so, search in my main library for songs labeled “delete” — since that’s simply a subset of the main library, all those songs can be deleted in one go.
The only issue is, well, I’m lazy! I run iTunes in the background, and when I’m in the midst of a thicket of code, emerging long enough to switch to iTunes, edit the Comment field, go to the next track, and return to the code can be disruptive to The Zone (yeah, we coders have it too). And I’m a programmer, damnit, so surely I should be able to do something to make the process easier!
And so I did.
So the chain looks like this:
- I press the rightmost “Media” key on my keyboard, above F12…
- …which I’ve configured to make IntelliType Pro execute this COM-aware JScript file under wscript…
- …which tells iTunes to append “delete” to the currently playing track’s Comment field, and advance to the next track.
Originally, I had a separate .bat file to execute the JS file, but that would always open (and transfer focus to) a new console window, so that had to go.
And yeah, I know I could set it up to start playing the next track and then delete the original track, but doing it this way lets me see how many dozen songs I’m removing in one go at the end of the week. It’s just less depressing to say “Ooh, I pared 130 songs from my library this time!” than “Hmm, only 4132 songs left! Woohoo!”.