Monday, May 29, 2006
playing with iTunes playlists
All of a sudden iTunes lost track of all the files in a playlist I'd created for a car trip a few months ago. I believe I made the playlist in Winamp and then imported it into iTunes (after some frustration, leading to this blog entry/rant), and then synched it to my iPod. I know it's still on my iPod because I listened to it on the plane last week. It's true, however, that I hate and avoid launching iTunes, so maybe it's now gone because iTunes lost it.
Anyway, the point of this blog entry is to document for myself how I fixed it. And because I never blog (except this weekend's flurry of angry entries) and the point of blogging is to put stuff out there for yourself and hope that your audience likes that stuff and your voice and what have you. Or you don't care about your audience, which, given my lack of any sort of traffic tracking, may actually be the case. My audience is, I guess, my wife and one or two coworkers. Anyway, sorry to digress. Most of this fix came from Rob Brooks-Bilson:
1) Backed up My Music\iTunes\iTunes Music Library.xml and iTunes Library.itl to *.iTunesSux (I'm mature like that)
2) Opened iTunes Music Library.xml in TextPad, the world's greatest text editor which I encourage you all to buy
3) Searched for my playlist name
4) Found that iTunes stores songs in the playlist by TrackID, fortunately they were sequentially numbered from 1455-1528
5) Searched for 1455 to find the first track (PROTIP: you will find any given integer string often in the iTunes XML file, prefix your search with [key]Track ID[/key][integer]1455 to be accurate (and also replace the  brackets with "less than & greater than" XML/HTML brackets))
6) found that it was in the /sounds/mp3 hierarchy as per my playlists (an idea that should allow my wife and my Media Center PC to use the same playlists despite storing MP3s on different drives and in different folders as long as they maintain the hierarchy), but needed to be in the file://localhost/D:/sounds/mp3/ hierarchy because iTunes is too STUPID to choose a default music library location and build its library off of that (or I'm too stupid to find that option :)
7) searched and replaced each of the 80 tracks in the playlist
8) opened up the ITL file, zeroed it out, and saved it (Rob says this causes iTunes to think its library is corrupt, and thus will rebuild it to reflect your changes to the XML file)
9) launched iTunes, and it ran through "Importing iTunes Music Library.XML" for a minute or so before telling my my ITL file was corrupt and that it had replaced it
10) iTunes then opened up and my playlist was fine.
And after all that, I noticed that, in iTunes' defense, the playlists I'd just imported (the Witch self-titled album, which is awesome -- doomy heavy metal with J Mascis on drums and a weird folk singer on vocals; a semi-new Bolt Thrower ("Those Once Loyal"), which is like every other Bolt Thrower album so if you like Bolt Thrower, and I like Bolt Thrower a lot, you'll like "Those Once Loyal"; and the new Cat Power "The Greatest", which is very different from the prior two albums but I'm trying to find new music that I can listen to on car trips when others are in the car with me) were listed with ../ to represent d:/sounds/mp3/, so maybe iTunes does have a default file location.
Anyway, just a quick blog entry for myself into which I snuck a music review. For those who are left hanging by the prior entry, I have OneNote 2007 working fine, and have an entry I'm working on with a review. In fact, I'm going to try and blog from OneNote now…