I wrote this one for my father as he has several audio tapes worth of MP3s to put into iTunes on Windows. It reads down through a directory structure for music files, using the nested directory names as metadata. It expects a nested directory structure as follows:
Root Dir
|- Artist Dirs
|- Album Dirs
|- Music files
Admittedly, this is my first usage of yield in anger. It hurt — but now my brain has been further fortified with vitamin Ruby.
Code follows…
Continue reading →
Ok, I’ve been a bit compulsive about having artwork for my movies and music in iTunes since we got our AppleTV. Ok, maybe more than a bit.
Even so, this little Rails application should give you some idea of how simple it is. It uses Amazon’s web service (which, it turns out, I misjudged), to look up candidate artwork for each album and displays them to you. You simply click on the desired image (higher resolution is typically better) and it will insert that artwork into iTunes for each track in your album.
I won’t pretend that this is the cleanest implementation but it gets the job done. If any of you watching at home want to play along, you will also need ruby/amazon installed.
FYI: Amazon’s search engine may not resolve all of your album names. You may want to manually search Amazon, in the case of stubborn albums, to determine what Amazon calls the album. However, more often than not, this shouldn’t be a problem if you ripped using iTunes.
Finally, this program could be easily adapted for hunting down artwork for your movie collection as well.
Code follows:
Continue reading →