iTunes foolishness


2005-10-04 01:16:17 PM
delphi57
When I bought my iPod I thought the idea of being able to display
album artwork was a great idea.
Then I discovered how annoying it is to get artwork into iTunes.
A google search led me to some sites with free utilities (or so I
thought) that could do the job for me.
One of them didn't work (at all), the other found some artwork then
invited me to register (for money) before it would go any further.
That's like a red rag to a bull. Could I do the same job in Delphi?
Both utilities required the .NET framework, so I figure they were
written in VB.NET. After all, that seems to be the language of choice
for most of the script kiddies.
In an ideal world, the .Net framework will be installed on all
computers so this shouldn't be a problem, but we don't live in an ideal
world. So I figured that a native Win32 version of the utility was a
must.
I've written it, it works, and writing it taught me all sorts of
interesting things about COM, SOAP, Event Sinks, and bandwidth.
The thing I wrote can be downloaded (complete with source) at:
homepages.ihug.co.nz/~trevorj/iTunesiPix.zip
Please bear in mind that it is not a good example of my normal coding:
it is only a learning exercise; something I wrote on the weekend to do a
specific job (so I allowed myself the obvious memory leak in the
StringLists and their objects), but at least it works better than the
alternatives, and has a smaller download requirement if you don't
already have the .NET framework.
I'll agree with anyone who says that it does {*word*194} things, but the
whole point of the project was (for me at least) to show that the .NET
framework should not be required for a simple utility, and that Delphi
is up to the job.
The code was written for and compiles with D7. There are a number of
tweaks that can be made so that it will work with D6, and anyone with D5
or less is probably not going to be able to make it work at all.
I'm interested in how it could be changed for D2005. I have a
sneaking suspicion that it would be a whole lot simpler (and smaller),
but I am not sure about the details.
Oh, the instructions: the GetPix button will try to get Album Artwork
for the Album currently being played in iTunes, the Automatic button
will try to get Artwork for everything in the iTunes library. The rest
of it you can probably figure out.
Another Oh: I have left out from the source the unit that contains my
Amazon subscriber ID. Please don't hack the exe to find it. Just get
your own. OK? The subscriber ID won't let you steal my identity or
allow you to charge things to my credit card, so there's no fun in
finding it when you can get your own for free.
This is not meant to be an announcement of a product, so please TeamB,
don't kick this message out as inappropriate for b.p.d.nt. My
motivation for posting is to find out how things could be done
differently in D2005 or C#, and maybe to fly the flag for old faithful
D7.
Scout