Monday, December 31, 2007

New Fetch Art 1.4 Compatible with iTunes 7.5 and Mac OS X 10.5 Leopard

I just completed work on fixes for the latest Mac OS X 10.5 and iTunes 7.5.

Download the latest version from VersionTracker here.

Tuesday, December 4, 2007

FetchArt incompatible with iTunes 7.5

Ok, I've been getting some comments and email asking when the new version of Fetch Art will be out that is Leopard compatible.

I did spend some time over the past weeks debugging the issue. It all comes down to a simple line of AppleScript that as far as I can tell based on the Leopard developer documentation, should work just fine.

The is the line that should work:
     set data of front artwork of trk to imageData


To test this, we can try this tiny AppleScript I wrote below. If you want, you can just copy and paste this into a new script file in the AppleScript Editor (don't even need to use Xcode.) This small code sample was modified from an example provided by Doug's AppleScripts for iTunes.

You need to do two things to run this script. Start up iTunes and select a track, any track. If it doesn't have any album art already, that is probably better. You'll also need a .pict format picture file. Not sure if you have one? Here, grab this file.

Then when it asks you to pick a file select your .pict format file.


try
set ourImage to read (choose file) as picture -- must be a pict file
try
tell application "iTunes"
set ourTrack to item 1 of selection -- need a track selected in iTunes before running this
tell ourTrack
set data of artwork 1 to ourImage
end tell
display alert "it worked"
end tell
on error
display alert "Error copying artwork to iTunes." as warning
end try
on error
display alert "Error reading file." as warning
end try


You can also just download that script from my server here.

I foolishly updated all of my computers up to iTunes 7.5 (even the two that I did NOT install Leopard on) and this script will NOT run correctly on any of them. So it appears to be more of an issue with iTunes 7.5 then Leopard.

If anyone who still has an iTunes prior to 7.5 can test this script and let me know that it actually works, I'd love to get that feedback. It's possible I've introduced an error in this script, since I cannot test it myself.

If any developers know why this line of code has stopped working, I'd love to hear that as well.

For now I'll be doing more testing, and posting to the developer forums, etc. to try and resolve this. I may even submit this as a bug to Apple.