« archives

March 2005
S M T W T F S
« Feb   Apr »
 12345
6789101112
13141516171819
20212223242526
2728293031  

recently

news from around the web

» view all

Album Art

March 2nd 2005

Been working on the playlist program in-between a giant project at school. Somehow I find this to be more useful than a primitive lexer and parser for Python. I have a feeling Python already has a great compiler, and the world doesn’t need a badly written one.

But I don’t think the world has seen this. At least not much. Basically, I’m searching for album art through Google Images, parsing the result page sent back for all image URLs in it, grabbing the images one at a time until I find one that’s square (to a tunable tolerance), resizing it to a specified size, caching it in a specified directory (with an optional maximum number of files cached, using a least-recently-played replacement policy), and returning the resulting image. Of course, if the album already has art cached, it doesn’t go searching; and if it can’t find anything on Google Images, it uses Froogle, which is more likely to have the image if the CD’s still on sale, but the images are lower quality. If neither Google Images or Froogle finds anything, it uses a specified default image.

Whew. It’s cool. Very cool. Take a look at the album art for the most recently played album.

Eventually this will be fully integrated into the playlist program, with the additional function to show a “bloglet” display for your sidebar or anywhere else. You’ll be able to simply tell it the width you want the bloglet to be (along with the margin for the images), the number of images to display, the configuration (eg: 4 images in a 2×2 block, or 6 images in a 2×3, etc), and the criteria (eg: most played songs, most recent albums, etc.). It will then produce a nice little DIV right into your page with images resized to fit. It will rock, to say the least. Expect more soon.


This entry was posted on Wednesday, March 2nd, 2005 at 2:49 pm and is filed under Technical, Weblog. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.


One Response to “Album Art”



  1. Joen Commented at 3:18 pm on March 2nd 2005

    This is very, very cool. Armed with a “Now Playing 2.0″ and this piece, I’ll be an even worse music fascist than I am now!

    Fantastic work. Can’t wait to see it hit the proverbial web.

Leave a Reply

Some XHTML allowed.