Blog

Recent Posts
Spam Filtering BitTorrent Library 0.6 Released New Project New Site Layout and Code Better iPhone/iPod Touch Automount
Archive
July, 2008June, 2008May, 2008April, 2008March, 2008February, 2008January, 2008December, 2007 Older
Recent Listening
Loading...
by

iTunes Files Mysteriously Disappearing

Over the past month or so, I've been extremenly frustrated to find around 200 songs in my carefully assembled MP3 library go missing from iTunes. This happened after I tried to rebuild my library from scratch trying to fix a problem my iPod seems to have developed - but that's another story. While, fortunately, I had a backup of the missing files, I suddenly found that I couldn't add them to iTunes. Add through the menu? nothing happens. Drag and drop? Nothing happens. Thanks to the fact that Apple programs "don't get those cryptic error messages" I had absolutely no idea why this was happening (thanks, Apple, really helpful). It could just be me, but honestly I think that users would light a slight inkling of what went wrong rather than a stoney silence (thats not user friendliness, Steve).

Anyway, after wracking my brains and Google, I decided there must be a problem with the structure of the file. Windows Media Player was playing the files back fine, as was everything else, so apparently there was something going on with iTunes and the file structure So now that I've re-written the tags (using a little ruby script I put together with id3lib) and compared the files, I've found out the problem: Windows Media Player seems to have added a second ID3 section a short distance after the first one in the structure of the file. I have no idea why this is - maybe they're trying to break itunes deliberately - but removing the second ID3 section (which, by the way, won't result in a loss of any of your precious ID3 tags) from the file seems to fix the problem.

The easiest way to fix all this mess is to re-write the ID3 tags on the corrupted files using a program which won't try to preserve the Media Player section. By reading the tags in with Ruby's id3lib and simply re-writing them (no change required) you can easily fix the files and get your MP3 library back on track. Another option is to use a batch tagging program to do the re-writing, but I was feeling adventurous and I don't trust batch programs to not mess things up even more.

So I guess this has two lessons. The first is that iTunes and Windows Media Player should not be both allowed to manage your music collection. I had Media Player on the job for a short time so that I could stream to my X-Box 360 (I now use TVersity) and I don't reccomend it. Media Player's even worse than iTunes as a music library manager, so stay away! The other less ons it always back up. My music library is huge and has taken years to assemble. It contains vast numbers of CDs from my own collection that I've ripped as well as friends CDs and iTunes music store purchases. I'm very glad I don't have to rebuild that.

If you've had the same problem as me and are hungry for a fix, try dropping me an email and I'll give you the script I wrote to fix my problem. I don't want to post it up here due to its specific nature and because I don't want to be responsible for deleting your music library by accident.

Link to this article | Make a Comment
Tags: iTunes, Apple, Bugs

Make a Comment