quicksilver/iTunes-qsplugin — pull request #1 by skurfer (2011-12-05 19:53:56+00:00)
Title: iTunes plug-in 2.0

OK, let’s get this (hopefully not too lengthy) process started. I’m pleased to present an updated version of the iTunes module.

A summary of changes:

* I’ve replaced as much AppleScript as I could with Objective-C. In theory, we should be able to replace it all, and I intend to keep trying, but for now, this is it. (There are some notes on Scripting Bridge in the README.)
* QSObjects representing tracks are created with an identifier (the “persistent ID” from iTunes) instead of just a name. This makes it easier for actions to locate the correct track later. It could theoretically conflict with other things in the catalog (since there’s no prefix like “QSiTunesModule-”), but it’s unlikely. Playlists have *always* been added to the catalog using the persistent ID.
* Current Track has been cleaned up, simplified and improved. It no longer involves looking at the recently played tracks array.
* A lot of repetitive code has been placed into reusable methods. (More can be done in this area.)
* A lot of unused code, resources, etc. were removed.
* Artwork support is greatly improved. Basically, it will use Quicksilver’s `imageWithPreviewOfFileAtPath` method, so if QuickLook shows something useful (in Finder) you’ll see it here.
* When this plug-in was last updated, iTunes only contained songs. Basic support for other formats (PDF and video) has been added. At the very least, they won’t cause problems any more.
* Children for the iTunes application are loaded from the catalog instead of reloading the XML library from disk.
* Preferences have been cleaned up.

So give it a try.

Advanced warning: If there are any complaints or problems involving iTunes DJ and/or something that is still implemented in AppleScript, be prepared to submit code that fixes it along with your comments. :-)