X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/7b7de4d405e383f18d69341f0f7459e4b3db35c4..28ef52fed0fa8f1d49c604cabe52b846bf01d393:/iTunesRemote.m diff --git a/iTunesRemote.m b/iTunesRemote.m index d41f3bd..3c1ce75 100755 --- a/iTunesRemote.m +++ b/iTunesRemote.m @@ -417,7 +417,17 @@ - (NSImage *)currentSongAlbumArt { - return nil; + NSAppleScript *script; + NSAppleEventDescriptor *moof; + NSData *data; + script = [[NSAppleScript alloc] initWithSource:@"tell application \"iTunes\"\nget data of artwork 1 of current track\nend tell"]; + moof = [script executeAndReturnError:nil]; + data = [moof data]; + if (data) { + return [[[NSImage alloc] initWithData:data] autorelease]; + } else { + return nil; + } } - (float)currentSongRating