quicksilver/iTunes-qsplugin — pull request #14 by skurfer (2013-03-28 17:58:57+00:00)
Title: work around some slowness that appeared in 10.8.3

In short, there would be a delay of several seconds before the music would start when playing an album. I suspect they fixed the AppleEvents bug, and in the process, made some operations on `SBObjects` much slower.

I had done something like this previously, but then found I was just going to the wrong list in iTunes (Library instead of Music). Going to Music instead was a tiny bit slower, but still acceptable and it kept the code much simpler.

The only question is: Should we scrap `NSPredicate` altogether and just filter all criteria using blocks? The code would probably be much cleaner and easier to understand if we did that, and I suspect it would be a bit faster, too. The downside is that we'd have to create a huge array for every possible criteria. Right now, we have an array of all artists and all album artists. We'd have to add all albums and all genres to that.

Also note that there's a potential downside to using `fileTracks` instead of `tracks`. I can only speculate, as I don't have iTunes Match enabled, but I suspect those tracks are excluded from the `fileTracks` array. If we ever want to add support for that… I don't know what we'd do. `tracks` doesn't give you location, and you need that to add something to a playlist.