iTunes Cover Art without iTunesaccount on Intel Macs

If for some reason you don’t want to
use your iTunes account to fetch cover art for your music
collection, maybe this is for you.
fetchart
Aric Friesen has written an iTunes script called Fetch Art to fetch cover art for your songs from
Amazon.
Unfortunately it will only work on powerpc Macs, as it uses some
compiled perl modules which are not yet universal/intel.
Although the author stated that he is willing to build an universal
application if he would get donations (which according to some
guestbook entries, he already received), there is still no updated
application for intel Macs available, and the application will
crash, when it comes to downloading the cover art.”holy me”

Now don’t panic….
…so what we need to do is to call the perl module in Rosetta
mode.

What calls the perl module ?
– Perl.

Lets check perl:
kobaans-computer: kobaan$
which perl
/usr/bin/perl

kobaans-computer: kobaan$ file /usr/bin/perl
/usr/bin/perl: Mach-O universal binary with 2 architectures
/usr/bin/perl (for architecture i386): Mach-O executable i386
/usr/bin/perl (for architecture ppc): Mach-O executable
ppc

So, perl, is actually a universal binary, that means an intel
platform Mac will call the intel code natively.
Let’s correct this for the runtime of Fetch Art.

FIRST: make a backup of your original perl binary
kobaans-computer: kobaan$
sudo cp /usr/bin/perl /Users/kobaan/perl

SECOND: strip the intel code from the perl binary
kobaans-computer: kobaan$
sudo lipo -remove i386 /usr/bin/perl -o
/Users/kobaan/perl-ppc

THIRD: copy the stripped ppc-only binary of perl over the original
“location” of perl
kobaans-computer: kobaan$
sudo cp /Users/kobaan/perl-ppc /usr/bin/perl

What have we done:
kobaans-computer: kobaan$
file /usr/bin/perl
/usr/bin/perl: Mach-O universal binary with 1 architecture
/usr/bin/perl (for architecture ppc): Mach-O executable
ppc

What will happen if we call the Fetch Art script from within iTunes now….
… select your files, (choose your amazon store in preferences), and fetch the cover
art,
WOOOO its working using Rosetta, not fast, but working.

NOW, THE IMPORTANT LAST THING TO DO !!!
After using the script for your collection, quit Fetch Art, and copy back your original “universal” perl
binary.
kobaans-computer: kobaan$
sudo cp /Users/kobaan/perl /usr/bin/perl

Done . Everything back to normal.

Save your donations,
Kobaan.