Hack 28. Add Album Art to ID3 Tags
Many MP3 players can display album art for a track if the art is embedded in the ID3 tag. Use the Album Cover Art Downloader tool to automate the process of adding cover art to your MP3s.
In this age of digital media and purchasing music from the Internet, there are still a few nice things about buying an actual CD. One of these things is the fact that a CD comes with album art. Album art not only can give you interesting photos of your favorite band and often song lyrics, but the cover of the album itself creates a distinctive look that you can use to identify the CD. Album art is popular even for MP3s, and a number of players can display album art that has been embedded in the ID3 tag. This hack will tell you how to use the aptly named Album Cover Art Downloader program to, well, download album cover art and add it to your ID3 tags.
The first step is to download and install Album Cover Art Downloader (called albumart for the rest of the hack). Go to the official web site at http://louhi.kempele.fi/~skyostil/projects/albumart and click on the link to the latest release. There you can download precompiled RPMs or DEB packages for your Linux distribution or, alternatively, you can download and build the source. To use albumart, you will need Python 2.3 or greater, QT 2.3 or greater (or QT 3.1 or greater), PyQT the QT Python bindings, and the Python Imaging Library.
# apt-get install python-qt3 python-imaging
Launch albumart from your applications menu or, alternatively, type albumart-qt from a terminal. The initial interface is pretty basic and empty, and the first step is to click File Open and browse to a directory containing your music collection. Hide albums with cover images.
To add album art to an album, click the album in the left-hand pane and then click the Download Covers button. albumart will query Amazon.com (and optionally Buy.com, WalMart, and Yahoo Images) for album art relating to your artist and album name and display any relevant images in the right-hand pane (see Figure 2-8). Select the album art that matches in that pane, and then click "Setas Cover" and albumart will add that cover art to all MP3s for that album. If the correct cover isn't there, you can search the Web on your own (or possibly scan it in), and then drag and drop the image from your file manager into the right pane of albumart.
Figure 2-8. Albumart with downloaded cover art