|
Album covers for your SliMP3
What's this all about?I love my SliMP3 player. It's easily one of the coolest electronic gadgets I have ever bought. One of the nice things about it is that it includes a web interface to control the player, including all the playlists and such. This feature also has the ability to show the album cover in the web interface, if an image file is in the same directory as the mp3s. Looks something like this (note that this image is scaled down to 800x600 to be of reasonable size). The problem I ran into was that I had a huge number of CDs and wasn't about to spend an insane amount of time scanning in every album cover. By an odd coincidence, at this same time, I discovered Amazon's SOAP interface to their database. A solution quickly evolved to meet my problem. It's possible to query Amazon's database for a given title, and pull down the image for the album cover from their site. This script will run over your mp3 directory, look at the ID3 tags of the mp3s it finds, and will perform several different types of searches on the Amazon database to find the closest matching album. It will then download the album cover, if it's available, and place it in the corresponding directory for that album. What does it require?At the very least, you'll need to have a fairly recent version of Perl running on your system. This code was tested with both version 5.6.1 and 5.8.0 and worked fine. You'll also need a few perl modules. Specifically: SOAP::Lite, and Image::Info. While these links go to the versions of the modules I used for testing and deploying, you generally are safe with installing whatever the latest version is. You'll also need a few other modules, but those should be a part of your standard perl install and of your SlimServer install. The easiest way to get the modules (if you're in a Linux or an OSX environment) is open up a
command line terminal, and then become the root
user. Then type in: If you're installing this program in a Windows environment, definitely check out the article on Automated installation with PPM for a good guide as to how to perform the above in Windows. Note that the latest version of Active Perl comes with SOAP::Lite and LWP already installed.
Charles Stantons adds his suggestion for how to get this to run in a Windows environment:
How do I get it to work?NOTE: If you do not have proper ID3 tags in your MP3s, this code will not work very well for you. If you need help in getting your mp3 collection organized with id3 tags, I highly recommend The MusicBrainz Tagger. It's hard to describe how cool of a tool it is -- check it out.
After you've downloaded and extracted the files,
you'll see in the newly created directory several
files. The one you're interested in is called make_cover.pl. That's all the setup you need to do. Just run the make_cover.pl and it will tell you the options that it needs, and once you got those done, run the script. It'll display an incremented "#" status indicator to let you know it's still working, and after some time (about 10 minutes on my system for over 600 CDs and downloading over DSL -- obviously this will be much slower if you're on a dial-up modem), you'll have a cover.jpg (or whatever you specified on the command line) file in every directory where the code could find a reasonable match. I can gurantee that it won't be 100% accurate (unless your ID3 tages are simply pristine and match up to what Amazon thinks they should be), but I am finding that I am hitting between 75% and 85% accuracy with my CD collection. Random observations made while developing this code
How do I get it?The latest version is always available here and the latest changes are available here.I have a question/suggestion/bug report for you...Questions, suggestions, ideas, and patches can be directed to the bug tracking system that's been set up. There you can enter bug requests, make suggestions, or ask for enhancements. Please use it -- that is a much more reliable way of getting things done rather than emailing me.If you need to get a hold of me personally, I am at: victor AT victorland.com. De-spamify the address accordingly. Stuff that still needs to get done
|