X-Git-Url: http://git.ithinksw.org/MenuTunes.git/blobdiff_plain/55639e195a5ec0ae91eba86cd0377df626e2040a..60a701dc9c0049a86bd739dbb8ae00c03cf90e48:/iTunesRemote.m diff --git a/iTunesRemote.m b/iTunesRemote.m index a4e1558..4b04840 100755 --- a/iTunesRemote.m +++ b/iTunesRemote.m @@ -422,17 +422,9 @@ - (NSImage *)currentSongAlbumArt { - NSAppleScript *script; - NSAppleEventDescriptor *moof; - NSData *data; ITDebugLog(@"Getting current song album art."); - script = [[NSAppleScript alloc] initWithSource:@"tell application \"iTunes\"\nget data of artwork 1 of current track\nend tell"]; - moof = [script executeAndReturnError:nil]; - data = [moof data]; - ITDebugLog(@"Getting current song album art done."); - - //NSLog(@"%@", [[ITAppleEventCenter sharedCenter] sendAEWithSendStringForData:@"'---':obj { form:'prop', want:type('prop'), seld:type('data'), from:obj { form:'indx', want:type('cArt'), seld:1, from:obj { form:'prop', want:type('prop'), seld:type('pTrk'), from:'null'() } } }" eventClass:@"core" eventID:@"getd" appPSN:savedPSN]); - + NSData *data = [[ITAppleEventCenter sharedCenter] sendAEWithSendStringForData:@"'----':obj { form:'prop', want:type('prop'), seld:type('pPCT'), from:obj { form:'indx', want:type('cArt'), seld:long(1), from:obj { form:'prop', want:type('prop'), seld:type('pTrk'), from:'null'() } } }" eventClass:@"core" eventID:@"getd" appPSN:savedPSN]; + ITDebugLog(@"Getting current song album art done."); if (data) { return [[[NSImage alloc] initWithData:data] autorelease]; } else {